type: object
description: |
    A persistent room record — the database row that survives restarts. Mirrors
    `cloud/src/Schemas.StoredRoom`. Distinct from `LiveRoom`, which is the
    Redis-backed real-time view (occupants, server assignment, current screens,
    etc.). Lobbies and TV rooms don't have stored rows; for those, the live
    snapshot's `storedRoomSnapshot` substitutes.
required: [roomId, ownerBigscreenAccountId, name]
properties:
    roomId:
        type: string
        description: External room id (e.g. `room:abc123`). Admins can join via this id; other users need an invite.
    creatorBigscreenAccountId: { type: string }
    ownerBigscreenAccountId: { type: string }
    serverId: { type: string, description: Server that owns this room. }
    roomStatus:
        type: string
        description: "`RoomStatus` value (`OK`, etc.)."
    inviteCode:
        type: string
        description: Shareable invite code; can be rotated at any time.
    name: { type: string }
    description: { type: string }
    category:
        type: string
        description: "`RoomCategory` — used for VR-side sorting; NSFW rooms are gated separately."
    publicTags:
        type: array
        items: { type: string }
    backgroundImageUrl: { type: string, format: uri }
    images:
        type: array
        items: { type: string, format: uri }
    environmentId:
        type: string
        description: Scene loaded on first join.
    maxUsersPerInstance:
        type: integer
        description: Max users per room instance; multiple instances may exist when the room is scaleable.
    roomType:
        type: string
        description: "Deprecated `RoomType` value."
        deprecated: true
    visibility:
        type: string
        description: "`RoomVisibility` — `Public`, `Private`, `FriendsOnly`."
    instancePolicy:
        type: string
        description: "`RoomInstancePolicy` — controls when new room instances spin up."
    screenSettings:
        type: object
        additionalProperties: true
        description: Default screen settings for the room.
    microphonePolicy: { type: string }
    movementSoundsPolicy: { type: string }
    drawingVisibility: { type: string }
    avatarNameVisibility: { type: string }
    poseVisibility: { type: string }
    toySpawnability: { type: string }
    preferredUserType: { type: string }
    stagedSocialIds:
        type: array
        items: { type: string }
        description: Staged users — granted draw / toy / mic / movement settings equivalent to admins.
    modSocialIds:
        type: array
        items: { type: string }
        description: Mods — can kick other users.
    adminBigscreenAccountIds:
        type: array
        items: { type: string }
    version: { type: string, example: "V1" }
    createdAt: { type: string, format: date-time }
example:
    roomId: "room:abc1234567"
    creatorBigscreenAccountId: "acct_01HXJ4Q12345"
    ownerBigscreenAccountId: "acct_01HXJ4Q12345"
    serverId: "ms-us-west-2-04"
    roomStatus: "OK"
    inviteCode: "BLUE-LION-9421"
    name: "Friday Movie Night"
    description: "Watching Big Buck Bunny."
    category: "Movie"
    publicTags: ["movie", "casual"]
    images: []
    environmentId: "env-cinema-01"
    maxUsersPerInstance: 12
    visibility: "FriendsOnly"
    instancePolicy: "Default"
    microphonePolicy: "All"
    movementSoundsPolicy: "On"
    drawingVisibility: "All"
    avatarNameVisibility: "Default"
    poseVisibility: "All"
    toySpawnability: "All"
    preferredUserType: "VerifiedUsersOnly"
    stagedSocialIds: []
    modSocialIds: []
    adminBigscreenAccountIds: ["acct_01HXJ4Q12345"]
    version: "V1"
    createdAt: "2026-04-22T10:14:00.000Z"
