100ms Logo

100ms

Docs

Search docs
/

End an active room

Trigger this request to end an active room.

POSThttps://api.100ms.live/v2/active-rooms/<room_id>/end-room
curl --location --request POST 'https://api.100ms.live/v2/active-rooms/<room_id>/end-room' \ --header 'Authorization: Bearer <management_token>' \ --header 'Content-Type: application/json' \ --data-raw '{ "reason": "Class has ended", "lock": false }'
RESPONSE
Status: 200 OK
{ "message": "session is ending" }

Arguments

NameTypeDescriptionRequired
room_id
— path param
stringUnique identifier of the room you wish to disable.

Example: 627cda81ab4f3b56a077dc33
Yes
reason
— body param
stringDescription to indicate the reason for ending the active room.No
lock
— body param
booleanStatus of the room to be set.
Allowed values: true, false.
Default: false (ends the current active session only)
No

Warning: If you set the lock argument to true, it will end the active room and users will not be able to join the room later as well. You can use enable a room API or dashboard to enable the room again.

Why would you use this API?

  • To disconnect all connected peers at a pre-defined timestamp if you wish to add a hard stop for any sessions.
  • Use this to allow peers to join the room only once daily for a respective time slot.
    • Trigger this API at the end of the session with the lock argument as true,
    • The next day, one minute before the schedule - use the enable a room API to enable the room to allow the users to join the session.


Run in postman