---
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-03-27** `c82cda3179a6` — 1 info
  - endpoint added
- **2020-03-25** `40da4d1cc401` — 1 breaking
  - api path removed without deprecation
- **2020-03-25** `8713c619a2d6` — 1 info
  - endpoint added
- **2015-09-27** `fdd6b89fcde2` — 1 breaking
  - api path removed without deprecation

[Change 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/a7ca99a8a310/schema)
