Liveblocks icon

Liveblocks

Call the Liveblocks REST API (rooms, comments, feeds, Yjs, AI, and more)

Room → Create

AI-generated

Summary

Create a new Liveblocks room with specified unique ID, default permissions, optional organization ID, per-user and per-group access overrides, metadata, and storage engine preference. Optionally return the existing room if it already exists instead of an error.

Inputs

  • Room ID (required) — Unique room identifier to create.
  • Default Accesses (required) — Default permissions to assign to the room such as room:write or room:read.
  • Organization ID — Organization context for the room; defaults to "default" if not provided.
  • Users Access — Per-user permission overrides to grant specific permissions to individual users or groups.
  • Groups Access — Per-group permission overrides to grant specific permissions to groups.
  • Metadata — JSON object of metadata entries to associate with the room; values can be strings or string arrays.
  • Storage Engine — Preferred storage engine version to use for the room (options: default/omit, 1, or 2).
  • Idempotent Create — If true, returns the existing room when it already exists instead of returning a 409 conflict error.

Output shape

a JSON object representing the created (or existing, if idempotent create is enabled and room exists) room resource

The returned object includes room details such as ID, permissions, metadata, and configuration. On creation failure, an error is returned. If 'Idempotent Create' is enabled and a room with the given ID exists, the existing room is returned instead of an error.

Links

Discussion