---
title: "Creates a room instance on the server."
method: POST
path: "/add"
tags: ["rooms"]
---

# Creates a room instance on the server.

`POST /add`

## Request body

- RoomsAddRequest
  - `UniqueID` integer, required — Unique ID of the room instance. This ID is used to identify the room in the server.
  - `Secret` string, required — Secret used for authenticating Simulator connections.
  - `MaxClients` integer, required — Maximum number of clients allowed to connect to the room instance.
  - `MaxEntities` integer, required — Maximum number of entities allowed to be created in the room instance.
  - `MaxQueriesPerClient` integer, required — Maximum number of queries that each client can have active at any time.
  - `SchemaName` string — Name of the schema to be used for the room instance.
  - `SchemaTimeout` integer — How long (in seconds) the schema should be cached in the server before being removed.
  - `SchemaUrls` string[] — URLs of the schemas to be used for the room instance.
  - `Schemas` string[] — List of schemas to be used for the room instance.
  - `DisconnectTimeout` integer, required — How long (in milliseconds) the server should wait before closing the connection to a client that hasn't sent any data.
  - `DebugStreams` boolean — Whether to enable debug streams for the room instance.
  - `SendFrequency` integer, required — Frequency (Hz) at which the server should send updates to clients.
  - `RecvFrequency` integer, required — Frequency (Hz) at which the server expects to receive updates from clients.
  - `MinQueryDistance` number, float — Minimum displacement distance for a query to be considered changed.
  - `CleanupTimeout` integer, required — How long (in seconds) the server should wait before removing a room instance that has no active clients.
  - `ProjectID` string, required — ID of the project to which the room instance belongs.
  - `KVP` object — Key-Value Pair (KVP) data associated with the room instance.
  - `PrivateKVP` object — Private Key-Value Pair (KVP) data associated with the room instance.
  - `Tags` string[] — Tags associated with the room instance.
  - `Created` string, date-time — Timestamp indicating when the room instance was created.
  - `HostAuthority` string — Comma-separated list of host authority features. Valid values are "create-entities" and "validate-connection". Example "create-entities,validate-connection"

## Response `200`

Room was created successfully

- RoomsAddResponse
  - `RoomID` integer, required — ID of the room instance as assigned by the server.
  - `Secret` string, required

## Other responses

- `400` — Bad request; invalid or missing parameters
- `401` — Unauthorized; invalid authentication token
- `500` — Internal Replication Server error
- `503` — Service unavailable; server is busy or overloaded

---

[API](https://skmtc.dev/coherence/apis/replication-server-rest-api.md) · [All operations](https://skmtc.dev/coherence/apis/replication-server-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/coherence/replication-server-rest-api/revisions/8549ca32d8fa/schema)
