> ## Documentation Index
> Fetch the complete documentation index at: /llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Rooms

> Observe, query, update, stop, and delete live rooms with current SDK room APIs.

Manage rooms after creation by observing a single room, querying room lists, updating room metadata, stopping a live session, or deleting a room record.

> [!NOTE]
>
> This page covers SDK room management APIs. Media publishing, LiveKit connection handling, and player UI are app-owned concerns.

## Platform Surface

| Platform | Single room | Room list | Mutations | Notes |
| - | - | - | - | - |
| TypeScript | `RoomRepository.getRoom(roomId, callback)` | `RoomRepository.getRooms(params, callback)` | `updateRoom()`, `stopRoom()`, `deleteRoom()` | Live callbacks return an unsubscribe function. Room list pagination uses `hasNextPage` and `onNextPage`. |
| iOS | `AmityRoomRepository().getRoom(withId:)` | `AmityRoomRepository().getRooms(with:)` | `updateRoom(withId:options:)`, `stopRoom(withId:)`, `deleteRoom(withId:)` | Retain the returned `AmityNotificationToken` while observing. |
| Android | `AmityVideoClient.newRoomRepository().getRoom(roomId)` | `AmityVideoClient.newRoomRepository().getRooms().build().query()` | `updateRoom()`, `stopRoom()`, `deleteRoom()` | Single rooms are `Flowable<AmityRoom>`; room lists are `Flowable<PagingData<AmityRoom>>`. |
| Flutter | No current public room repository found in this audit | Not available | Not available | The Flutter SDK source exposes older stream APIs, not the room broadcasting repository. |

## Parameters

| Concept | TypeScript | iOS | Android |
| - | - | - | - |
| Status filter | `statuses?: Amity.RoomStatus[]` | `statuses: [AmityRoomStatus]?` | `setStatuses(Array<AmityRoomStatus>)` |
| Room type filter | `type?: Amity.RoomType` | `type: AmityRoomType?` | `setTypes(Array<AmityRoomType>)` |
| Deleted rooms | `includeDeleted?: boolean` | `isDeleted: Bool` | `setIsDeleted(Boolean?)` |
| Sort order | `sortBy?: "firstCreated"` or `"lastCreated"` | `sortBy: AmityRoomSortOption` | `setSortBy(AmityRoomSortOption?)` |
| Page size | `limit?: number` | Not exposed on `AmityRoomQueryOptions` | Paging 3 controls consumption after `PagingData` emission |

### Mutation Parameters

| Operation | TypeScript | iOS | Android |
| - | - | - | - |
| Update | `updateRoom(roomId, bundle)` | `updateRoom(withId:options:)` | `updateRoom(roomId, ...)` |
| Stop | `stopRoom(roomId)` | `stopRoom(withId:)` | `stopRoom(roomId)` |
| Delete | `deleteRoom(roomId)` | `deleteRoom(withId:)` | `deleteRoom(roomId)` |

| Update field | TypeScript | iOS | Android |
| - | - | - | - |
| Title | `title` | `title` | `title` |
| Description | `description` | `description` | `description` |
| Thumbnail | `thumbnailFileId` | `thumbnailFileId` | `thumbnailFileId` |
| Metadata | `metadata` | `metadata` | `metadata` |
| Live chat flag | `liveChatEnabled` | `channelEnabled` | `liveChatEnabled` |
| Parent room | `parentRoomId` | Not exposed by update options | Not exposed by update API |

## Get a Room

Use the single-room API when a screen needs live updates for one room.

```typescript TypeScript theme={null}
import { RoomRepository } from "@amityco/ts-sdk";

function observeRoom(roomId: string): Amity.Unsubscriber {
  return RoomRepository.getRoom(roomId, snapshot => {
    if (snapshot.error) {
      handleError(snapshot.error);
      return;
    }

    showSuccessMessage(snapshot.data.status);
  });
}
```

```kotlin Android theme={null}
import com.amity.socialcloud.sdk.api.video.AmityVideoClient

val disposable = AmityVideoClient.newRoomRepository()
    .getRoom(roomId)
    .subscribe(
        { room -> showSuccessMessage(room.getStatus()) },
        { error -> handleGeneralError(error) }
    )
```

```swift iOS theme={null}
var roomObservationToken: AmityNotificationToken?
let roomObject = AmityRoomRepository().getRoom(withId: roomId)

roomObservationToken = roomObject.observe { liveObject, error in
    if let error {
        handleGeneralError(error)
        return
    }

    if let room = liveObject.snapshot {
        showSuccessMessage(room.status.rawValue)
    }
}
```

## Query Rooms

Use the room-list API for discovery, dashboards, moderation queues, or live-room shelves.

```typescript TypeScript theme={null}
import { RoomRepository } from "@amityco/ts-sdk";

function observeLiveRooms(): Amity.Unsubscriber {
  return RoomRepository.getRooms(
    {
      statuses: ["live"],
      type: "coHosts",
      sortBy: "lastCreated",
      includeDeleted: false,
      limit: 20,
    },
    snapshot => {
      if (snapshot.error) {
        handleError(snapshot.error);
        return;
      }

      renderResults(snapshot.data);

      if (snapshot.hasNextPage) {
        snapshot.onNextPage?.();
      }
    },
  );
}
```

```kotlin Android theme={null}
import androidx.paging.PagingData
import com.amity.socialcloud.sdk.api.video.AmityVideoClient
import com.amity.socialcloud.sdk.model.video.room.AmityRoom
import com.amity.socialcloud.sdk.model.video.room.AmityRoomSortOption
import com.amity.socialcloud.sdk.model.video.room.AmityRoomStatus
import com.amity.socialcloud.sdk.model.video.room.AmityRoomType

val disposable = AmityVideoClient.newRoomRepository()
    .getRooms()
    .setStatuses(arrayOf(AmityRoomStatus.LIVE))
    .setTypes(arrayOf(AmityRoomType.CO_HOSTS))
    .setIsDeleted(false)
    .setSortBy(AmityRoomSortOption.LastCreated)
    .build()
    .query()
    .subscribe(
        { pagingData: PagingData<AmityRoom> -> showSuccessMessage(pagingData) },
        { error -> handleGeneralError(error) }
    )
```

```swift iOS theme={null}
var roomCollectionToken: AmityNotificationToken?
let options = AmityRoomQueryOptions(
    statuses: [.live],
    type: .coHosts,
    isDeleted: false,
    sortBy: .lastCreated
)

let rooms = AmityRoomRepository().getRooms(with: options)

roomCollectionToken = rooms.observe { collection, error in
    if let error {
        handleGeneralError(error)
        return
    }

    showSuccessMessage(collection.snapshots.map { $0.roomId })

    if collection.hasNext {
        collection.nextPage()
    }
}
```

> [!NOTE]
>
> TypeScript filters by a single `type` value. Android's builder accepts `setTypes(...)` because the Android query model supports an array of room types.

## Update a Room

Update room display fields and metadata. Participants, room type, and room identity are not update fields in these APIs.

```typescript TypeScript theme={null}
import { RoomRepository } from "@amityco/ts-sdk";

const { data: updatedRoom } = await RoomRepository.updateRoom(roomId, {
  title: "Updated Room Title",
  description: "New description",
  thumbnailFileId: imageFileId,
  metadata: {
    category: "updated",
  },
  liveChatEnabled: true,
});

showSuccessMessage(updatedRoom.roomId);
```

```kotlin Android theme={null}
import com.amity.socialcloud.sdk.api.video.AmityVideoClient
import com.google.gson.JsonObject

val metadata = JsonObject().apply {
    addProperty("category", "updated")
}

AmityVideoClient.newRoomRepository()
    .updateRoom(
        roomId = roomId,
        title = "Updated Room Title",
        description = "New description",
        thumbnailFileId = imageFileId,
        metadata = metadata,
        liveChatEnabled = true
    )
    .subscribe(
        { room -> showSuccessMessage(room.getRoomId()) },
        { error -> handleGeneralError(error) }
    )
```

```swift iOS theme={null}
let options = AmityRoomUpdateOptions(
    title: "Updated Room Title",
    description: "New description",
    thumbnailFileId: imageFileId,
    metadata: ["category": "updated"],
    channelEnabled: true
)

let room = try await AmityRoomRepository()
    .updateRoom(withId: roomId, options: options)

showSuccessMessage(room.roomId)
```

## Stop or Delete a Room

Stop a live session when broadcasting ends. Delete a room when your product flow should remove the room record.

```typescript TypeScript theme={null}
import { RoomRepository } from "@amityco/ts-sdk";

const { data: stoppedRoom } = await RoomRepository.stopRoom(roomId);
showSuccessMessage(stoppedRoom.status);

await RoomRepository.deleteRoom(roomId);
showSuccessMessage(roomId);
```

```kotlin Android theme={null}
import com.amity.socialcloud.sdk.api.video.AmityVideoClient

val roomRepository = AmityVideoClient.newRoomRepository()

roomRepository.stopRoom(roomId)
    .andThen(roomRepository.deleteRoom(roomId))
    .subscribe(
        { showSuccessMessage(roomId) },
        { error -> handleGeneralError(error) }
    )
```

```swift iOS theme={null}
let roomRepository = AmityRoomRepository()

let stoppedRoom = try await roomRepository.stopRoom(withId: roomId)
showSuccessMessage(stoppedRoom.status.rawValue)

try await roomRepository.deleteRoom(withId: roomId)
showSuccessMessage(roomId)
```

> [!WARNING]
>
> Stopping a room ends the current broadcast session. Do not document or build a "restart same room" flow unless your product and backend contract explicitly support it.

## Recorded Playback Boundary

Recorded playback is intentionally separate from room lifecycle management:

* TypeScript exposes `RoomRepository.getRecordedUrl(roomId)`.
* Android exposes `getRecordedUrls(roomId)`.
* iOS reads recorded playback data from `AmityRoom.recordedData`.

See [Recorded Playback](/social-plus-sdk/video-new/broadcasting/recorded-playback.md) for playback-specific guidance.

## Related Topics

> [card] [Create Room](/social-plus-sdk/video-new/broadcasting/create-room.md)
>
> Create a room before observing or mutating it.

> [card] [Rooms Overview](/social-plus-sdk/video-new/broadcasting/rooms-overview.md)
>
> Review room fields, statuses, participants, and playback metadata.

> [card] [Co-Host Management](/social-plus-sdk/video-new/broadcasting/co-host-management.md)
>
> Manage co-host invitations, removal, and permissions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.