Skip to main content

POST API to Create Meeting Room


POST
    https://<appname>.metered.live/api/v1/room

<appname> - replace it the name of your app.

Description

This endpoint allows you to create a Meeting Room

Parameters

ParametersDescriptionRequiredOptions
Query
secretKeystringyour secret keyyes-
Bodyapplication/json
roomNamestringIf not specified the room name will be auto-generated. Name should be URL friendly, do not put any spaces in the name.no-
privacystringPrivacy setting for the room. Public rooms can be joined by anyone, private rooms required auth token to joinyespublic | private
expireUnixSecintegerunix timestamp in seconds to specify the expiry of the room. Users cannot join after expiryno-
ejectAtRoomExpbooleanEject all the participants in the room when expireUnixSec is reachedno-
notBeforeUnixSecintegerUnix timestamp in seconds. Users cannot join the before this time.no-
maxParticipantsintegerLimit the maximum number of participants that can join the roomno-
autoJoinbooleanEnable auto joinnofalse | true
showInviteBoxbooleaniframe only option. Show the invite box in the meeting room when no participants are there in the meeting. default truenotrue | true
enableRequestToJoinbooleanEnable public users to request to join a private meeting. A request will be sent to the meeting admin, and when approved the user can joinnofalse | true
enableChatbooleaniframe only option. Enable chat messagesnofalse | true
newChatForMeetingSessionbooleaniframe only option. Create a new chat room for each meeting session, if set to false chat history will persist during multiple calls. default trueno
enableScreenSharingbooleaniframe only option. Allow users to do screen sharingnofalse | true
joinVideoOnbooleaniframe only option. When user joins the meeting the camera will be default onnofalse | true
joinAudioOnbooleaniframe only option. When the user joins the meeting the microphone will be default onnofalse | true
enableRecordingbooleanUsers can record Meetingnofalse | true
ownerOnlyBroadcastbooleandefault false. Only admin can share camera, mic, and screen.nofalse | true
recordRoombooleanAutomatically record the meeting
ejectAfterElapsedTimeInSecintegerEject user after certain time from the meeting. For e.g in your application you want remove the user to be active for max 2hrs then you can set this value to 7200 (2hrs in seconds). It is a good idea to set this value to prevent people from keeping the session on for extremely long times.no-
meetingJoinWebhookstringWhen a user joins the room, a webhook will be sent to the specified urlno-
meetingLeftWebhookstringWebhook is trigged when participant leaves the meeting.
meetingStartedWebhookstringWebhook is trigged when a meeting session is created.
meetingEndedWebhookstringWebhook is trigged when a meeting is ends.
endMeetingAfterNoActivityInSecintegerTime is seconds, End the meeting automatically if no one in the meeting is sharing their microphone, camera or screen. Suppose if you want to end the meeting after 5 mins if no one is sharing any device, the you would set the value of this property to 300 (5 mins in seconds)no-
audioOnlyRoombooleanWhen set to true, only audio/microphone can be shared in this room, and audio only pricing will be applied.nofalse | true
enableCompositionbooleanComposition will be enabled. Composition has to be enabled for recording a composed meeting, for livestreaming and RTMP out.notrue | false
compositionLayoutenumSet the layout of the compositionnogrid | active_speaker
recordCompositionbooleanWhen enable composition will be recordednotrue | false
enableRTMPOutbooleanWhen enable meeting will be stream to 3rd party service like Youtube Live, Facebook Live, Twitch etc.notrue | false
rtmpOutURLstringURL for the 3rd Party RTMP Service. For more details refer this guide: https://www.metered.ca/docs/RTMP-OUT/Streaming-The-Meeting-To-Youtube-LiveWhen rtmpOut is enable then this become required
enableLiveStreamingbooleanWhen enabled, livestreaming via HLS will be enabled. You will get a HLS URL for the meetingnotrue

Request Samples

cURL
curl --request POST \
--url 'https://appname.metered.live/api/v1/room?secretKey={replace_this_with_your_secretKey}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '
{
"roomName": "string",
"privacy": "public",
"expireUnixSec": 0,
"ejectAtRoomExp": false,
"notBeforeUnixSec": 0,
"maxParticipants": 0,
"autoJoin": true,
"enableRequestToJoin": true,
"enableChat": true,
"enableScreenSharing": true,
"joinVideoOn": false,
"joinAudioOn": false,
"recordRoom": true,
"ejectAfterElapsedTimeInSec": 0,
"meetingJoinWebhook": "string",
"endMeetingAfterNoActivityInSec": 0,
"audioOnlyRoom": false
}
'

Responses

200
{
"privacy": "public",
"deleteOnExp": false,
"autoJoin": false,
"enableRequestToJoin": false,
"enableChat": false,
"enableScreenSharing": true,
"joinVideoOn": true,
"joinAudioOn": true,
"ownerOnlyBroadcast": false,
"recordRoom": false,
"ejectAtRoomExp": false,
"lang": "en",
"archived": false,
"_id": "61005784c3c9104421af1534",
"roomName": "6kpYYvYj75",
"app": "61005767f41008463845bac0",
"created": "2021-07-27T18:59:16.448Z",
"__v": 0
}
400

{
"success": false,
"message": "Invalid request"
}