---
title: "Creates a room"
method: POST
path: "/room"
tags: ["room"]
---

# Creates a room

`POST /room`

## Request body

- RoomConfig — Room configuration
  - `maxPeers` integer, nullable — Maximum amount of peers allowed into the room
  - `videoCodec` 'h264' | 'vp8', nullable — Enforces video codec for each peer in the room

## Response `201`

Room successfully created

- RoomDetailsResponse — Response containing room details
  - `data` Room, required — Description of the room state
    - `components` Component[], required
      - `id` string, required — Assigned component id
      - `type` string, required — Component type
    - `config` RoomConfig, required — Room configuration
      - `maxPeers` integer, nullable — Maximum amount of peers allowed into the room
      - `videoCodec` 'h264' | 'vp8', nullable — Enforces video codec for each peer in the room
    - `id` string, required — Room ID
    - `peers` Peer[], required
      - `id` string, required — Assigned peer id
      - `status` 'connected' | 'disconnected', required — Informs about the peer status
      - `type` string, required — Peer type

## Other responses

- `400` — Invalid request structure
- `401` — Unauthorized

## Changes

- **2023-07-18** `dafa9a249254` — 2 breaking, 4 warning, 7 info
  - removed the required property `data/fishjam_address` from the response with the `201` status
  - removed the required property `data/room` from the response with the `201` status
  - removed the request property `peerDisconnectedTimeout`
  - removed the request property `peerlessPurgeTimeout`
  - …9 more

[Change history](https://skmtc.dev/fishjam-dev/apis/fishjam-media-server/changes/room/post.md)

---

[API](https://skmtc.dev/fishjam-dev/apis/fishjam-media-server.md) · [All operations](https://skmtc.dev/fishjam-dev/apis/fishjam-media-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fishjam-dev/fishjam-media-server/revisions/dafa9a249254/schema)
