---
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

- RoomCreateDetailsResponse — Response containing room details
  - `data` object, required
    - `jellyfish_address` string, required — Jellyfish instance address where the room was created. This might be different than the address of Jellyfish where the request was sent only when running a cluster of Jellyfishes.
    - `room` Room, required — Description of the room state
      - `components` Component[], required
        - `id` string, required — Assigned component id
        - `metadata` ComponentMetadata, required — Component-specific metadata
          - `playable` boolean
        - `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-08-16** `9238d08d76b4` — 4 breaking, 2 info
  - removed the required property `data/components` from the response with the `201` status
  - removed the required property `data/config` from the response with the `201` status
  - removed the required property `data/id` from the response with the `201` status
  - removed the required property `data/peers` from the response with the `201` status
  - …2 more
- **2023-08-11** `dd86a9fe6954` — 1 breaking, 2 warning, 4 info
  - the `data` response's property type changed from no type to `object` for status `201`
  - removed the optional property `data/jellyfish_address` from the response with the `201` status
  - removed the optional property `data/room` from the response with the `201` status
  - added the required property `data/components` to the response with the `201` status
  - …3 more
- **2023-08-01** `489382f74f54` — 5 breaking, 2 info
  - the `data` response's property type changed from `object` to no type for status `201`
  - removed the required property `data/components` from the response with the `201` status
  - removed the required property `data/config` from the response with the `201` status
  - removed the required property `data/id` from the response with the `201` status
  - …3 more
- **2023-07-24** `9737a4ba7e63` — 1 info
  - added the required property `data/components/items/metadata` to the response with the `201` status
- …earlier changes not shown

[Full 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/0b0592e6fbc9/schema)
