Skip to main content

Create Room

Endpoint: /room/create

Before you create your first room, it's helpful to understand how rooms work in Plug-N-Meet. Think of a room not as a permanent space, but as a temporary live session.

Here's the typical lifecycle:

  1. You create a room using this API endpoint.
  2. You generate access tokens for users to join the session.
  3. The session remains active as long as participants are present.
  4. The session ends automatically when the last participant leaves or can be terminated via an API call.

Once a session is over, the room is finalized, and all associated data (like chat messages and user lists) is cleared. This ensures that each new session starts fresh.

Pro Tip: Simulating Permanent Rooms

If you want to create the experience of a "permanent" room that users can join at any time, you can build this logic into your application.

When a user attempts to join, your application should:

  1. Check if an active session for that room_id already exists (e.g., using the isRoomActive API).
  2. If no session exists, call this create endpoint to start a new one.
  3. Finally, generate an access token to allow the user to join.

This approach gives you the flexibility of persistent-like rooms while leveraging Plug-N-Meet's temporary session model.

Request Parameters

FieldTypeRequiredDescription
room_idstringYesA unique identifier for the room. Since rooms are temporary, you can reuse a room_id after a session has ended.
max_participantsnumberNoThe maximum number of participants allowed in the room.
empty_timeoutnumberNoThe number of seconds the room will remain active after creation if no one joins.
metadataobjectYesAdditional room configuration details.

Metadata

FieldTypeRequiredDescription
room_titlestringYesThe title of the room or meeting.
welcome_messagestringNoA message displayed to participants when they join.
webhook_urlstringNoURL to receive webhook events from Plug-N-Meet.
logout_urlstringNoURL to redirect users after the meeting or session ends.
room_featuresobjectYesSettings to enable or disable various room features.
default_lock_settingsobjectNoDefault settings to lock specific features for users.
copyright_confobjectNoCopyright configuration.
extra_datastringNoAny additional data you wish to store.

Room Features

FieldTypeRequiredDescription
allow_webcamsbooleanYesEnable or disable webcam support.
mute_on_startbooleanYesAutomatically mute microphones when participants join.
allow_screen_sharebooleanYesEnable or disable screen sharing.
allow_rtmpbooleanYesEnable or disable RTMP streaming.
admin_only_webcamsbooleanYesAllow webcam access only for admins.
allow_view_other_webcamsbooleanYesAllow participants to view each other's webcams. If false, only moderators can see all webcams.
allow_view_other_users_listbooleanYesRestrict viewing of the user list to moderators only.
enable_analyticsbooleanNoEnable or disable analytics reporting for the session. Default: false
allow_virtual_bgbooleanNoEnable or disable virtual background options.
allow_raise_handbooleanNoEnable or disable the "raise hand" feature.
auto_gen_user_idbooleanNoPlugNmeet requires a unique userId for each participant. Enable this if you prefer not to manage userIds or need to allow the same user to join from multiple devices. When true, PlugNmeet generates a unique user_id for each session. Any user_id you provide will be stored as ex_user_id, retrievable via the getActiveRoomInfo API. Default: false
room_durationnumberNoSet a fixed duration for the room in minutes. 0 means unlimited.
recording_featuresobjectYesRecording settings.
chat_featuresobjectYesChat settings.
shared_note_pad_featuresobjectYesShared notepad settings.
whiteboard_featuresobjectYesWhiteboard settings.
external_media_player_featuresobjectYesExternal media player settings.
waiting_room_featuresobjectYesWaiting room settings.
breakout_room_featuresobjectYesBreakout room settings.
display_external_link_featuresobjectYesSettings for displaying external links.
ingress_featuresobjectNoRTMP ingress settings.
speech_to_text_translation_featuresobjectNoSpeech-to-text and translation settings.
end_to_end_encryption_featuresobjectNoEnd-to-End Encryption (E2EE) settings.

Recording Features

FieldTypeRequiredDescription
is_allowbooleanYesEnable or disable recording for the meeting.
is_allow_cloudbooleanYesEnable or disable cloud recording.
is_allow_localbooleanYesEnable or disable local recording.
enable_auto_cloud_recordingbooleanNoAutomatically start cloud recording when a moderator or admin joins.

Chat Features

FieldTypeRequiredDescription
allow_chatbooleanYesEnable or disable chat for the meeting.
allow_file_uploadbooleanYesEnable or disable file uploads in chat.

Shared Notepad Features

FieldTypeRequiredDescription
allowed_shared_note_padbooleanYesEnable or disable the shared notepad feature.

Whiteboard Features

FieldTypeRequiredDescription
allowed_whiteboardbooleanYesEnable or disable the whiteboard feature.
preload_filestringNoPreload a remote (http/https) presentation file for the whiteboard. The file must be directly accessible without redirection.

External Media Player Features

FieldTypeRequiredDescription
allowed_external_media_playerbooleanYesEnable or disable playback of video/audio from external sources. Moderators can also upload local media.

Waiting Room Features

FieldTypeRequiredDescription
is_activebooleanYesEnable to activate the waiting room feature. Users remain in the waiting room until allowed to join by a moderator.

Breakout Room Features

FieldTypeRequiredDescription
is_allowbooleanYesEnable or disable breakout rooms.
allowed_number_roomsnumberNoMaximum number of breakout rooms that can be created simultaneously. Default: 6
FieldTypeRequiredDescription
is_allowbooleanYesEnable or disable the display of external links inside an iframe. Useful for showing websites, quizzes, or games. Note: The external site must allow being embedded in an iframe. Moderators can pass values like name, userId, role, and meetingId to the URL.

Ingress Features

FieldTypeRequiredDescription
is_allowbooleanYesEnable media ingress to stream content directly into the session. This is useful for professional broadcasting using software like OBS Studio. Plug-N-Meet supports both RTMP and WHIP (WebRTC-HTTP Ingestion Protocol) for low-latency streaming.

Speech-to-Text/Translation Features

FieldTypeRequiredDescription
is_allowbooleanYesEnable or disable speech-to-text functionality. This feature uses Microsoft Azure, so ensure your API credentials are configured correctly on the server.
is_allow_translationbooleanYesEnable or disable automatic translation.

End-to-End Encryption (E2EE) Features

FieldTypeRequiredDescription
is_enabledbooleanYesEnable or disable E2EE. Supported browsers: Chromium 83+, Google Chrome, Microsoft Edge, Safari, Firefox 117+. Note: Users cannot join if their browser does not support E2EE.
included_chat_messagesbooleanNoEnable or disable E2EE for chat messages.
included_whiteboardbooleanNoEnable or disable E2EE for whiteboard messages (SCENE_UPDATE, POINTER_UPDATE). May increase CPU usage; enable only if necessary.

Default Lock Settings

FieldTypeRequiredDescription
lock_microphonebooleanNoLock microphone for users.
lock_webcambooleanNoLock webcam for users.
lock_screen_sharingbooleanNoLock screen sharing for users.
lock_chatbooleanNoLock chat for users.
lock_chat_send_messagebooleanNoLock sending messages in chat.
lock_chat_file_sharebooleanNoLock file sharing in chat.

This feature is available only if the server configuration client > copyright_conf > allow_override is set to true.

FieldTypeRequiredDescription
displaybooleanYesEnable or disable the display of copyright text.
textstringYesCopyright text. Keep it concise. Supported HTML tags: b, i, em, strong, a

Example

{
"room_id": "room01",
"metadata": {
"room_title": "Test room",
"welcome_message": "Welcome to room",
"room_features": {
"allow_webcams": true,
"mute_on_start": false,
"allow_screen_share": true,
"allow_rtmp": true,
"admin_only_webcams": false,
"allow_view_other_webcams": true,
"allow_view_other_users_list": true,
"allow_polls": true,
"enable_analytics": true,
"allow_virtual_bg": true,
"allow_raise_hand": true,
"auto_gen_user_id": false,
"room_duration": 0,
"recording_features": {
"is_allow": true,
"is_allow_cloud": true,
"is_allow_local": true,
"enable_auto_cloud_recording": false
},
"chat_features": {
"allow_chat": true,
"allow_file_upload": true
},
"shared_note_pad_features": {
"allowed_shared_note_pad": true
},
"whiteboard_features": {
"allowed_whiteboard": true
},
"external_media_player_features": {
"allowed_external_media_player": true
},
"waiting_room_features": {
"is_active": false
},
"breakout_room_features": {
"is_allow": true,
"allowed_number_rooms": 2
},
"display_external_link_features": {
"is_allow": true
},
"ingress_features": {
"is_allow": true
},
"speech_to_text_translation_features": {
"is_allow": true,
"is_allow_translation": true
},
"end_to_end_encryption_features": {
"is_enabled": false
}
},
"default_lock_settings": {
"lock_microphone": false,
"lock_webcam": false,
"lock_screen_sharing": true,
"lock_whiteboard": true,
"lock_shared_notepad": true,
"lock_chat": false,
"lock_chat_send_message": false,
"lock_chat_file_share": false,
"lock_private_chat": false
}
}
}

Response

FieldTypeDescription
statusbooleanIndicates if the request was successful.
msgstringResponse message.
room_infoobjectDetails about the room.