---
title: "Sets room state to locked or unlocked"
method: POST
path: "/room/{roomName}/state"
tags: ["Rooms"]
---

# Sets room state to locked or unlocked

`POST /room/{roomName}/state`

Returns the room info after locking operation.

## Path parameters

- `roomName` string, required

## Request body

- string

## Response `200`

Room data after successful operation

## Other responses

- `400` — Unexpected error

## Changes

- **2020-10-10** `7cd1abbcf31e` — 1 info
  - endpoint added
- **2020-09-10** `66e858cc5f97` — 1 breaking
  - api path removed without deprecation
- **2020-08-06** `770ab7823837` — 1 info
  - endpoint added
- **2020-08-06** `c0f6f5d96785` — 1 breaking
  - api path removed without deprecation
- **2020-03-27** `c82cda3179a6` — 1 info
  - endpoint added

[Full history](https://skmtc.dev/opentok/apis/opentokrtc-api/changes/room/:roomName/state/post.md)

---

[API](https://skmtc.dev/opentok/apis/opentokrtc-api.md) · [All operations](https://skmtc.dev/opentok/apis/opentokrtc-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/opentok/opentokrtc-api/revisions/7c588b24fbe6/schema)
