RoomService
Chatto exposes this service below /api/connect.
Shared message and enum definitions are documented in Shared Types And Enums.
RoomService
Section titled “RoomService”Manages room-scoped operations for the current user.
RoomService owns operations whose authorization and state are primarily scoped to one room, including lifecycle, membership, moderation, room timeline reads, room read state, attachments, and live typing. Resource-specific services should still be preferred when an operation is not naturally room-scoped or when the resource needs an independent CRUD/batch surface.
CreateRoom
Section titled “CreateRoom”Creates a new channel room in a room group. The caller must be allowed to create rooms in the target group.
POST /api/connect/chatto.api.v1.RoomService/CreateRoomInput: CreateRoomRequest
Section titled “Input: CreateRoomRequest”Request to create a channel room.
| Field | Type | Description |
|---|---|---|
name | string | Required. Name of the new channel room. |
description | string | Optional room description. |
group_id | string | Required. Room group that should contain the new channel. |
universal | bool | Whether the new channel should grant effective membership to eligible server members. |
Result: CreateRoomResponse
Section titled “Result: CreateRoomResponse”Result of creating a room.
| Field | Type | Description |
|---|---|---|
room | Room | Created room. |
UpdateRoom
Section titled “UpdateRoom”Updates a room’s editable metadata. The caller must be allowed to manage rooms. Direct-message rooms cannot be universal.
POST /api/connect/chatto.api.v1.RoomService/UpdateRoomInput: UpdateRoomRequest
Section titled “Input: UpdateRoomRequest”Request to update a room’s editable metadata.
| Field | Type | Description |
|---|---|---|
room_id | string | Required. Room to update. |
name | optional string | New room name, when changing it. |
description | optional string | New room description, when changing it. Empty clears the description. |
universal | optional bool | New universal membership state, when changing it. Direct-message rooms cannot be universal. |
Result: UpdateRoomResponse
Section titled “Result: UpdateRoomResponse”Result of updating a room.
| Field | Type | Description |
|---|---|---|
room | Room | Updated room. |
ArchiveRoom
Section titled “ArchiveRoom”Archives a room so it is hidden from active room lists. The caller must be allowed to manage rooms.
POST /api/connect/chatto.api.v1.RoomService/ArchiveRoomInput: ArchiveRoomRequest
Section titled “Input: ArchiveRoomRequest”Request to archive a room.
| Field | Type | Description |
|---|---|---|
room_id | string | Required. Room to archive. |
Result: ArchiveRoomResponse
Section titled “Result: ArchiveRoomResponse”Result of archiving a room.
| Field | Type | Description |
|---|---|---|
room | Room | Archived room. |
UnarchiveRoom
Section titled “UnarchiveRoom”Restores an archived room to active room lists. The caller must be allowed to manage rooms.
POST /api/connect/chatto.api.v1.RoomService/UnarchiveRoomInput: UnarchiveRoomRequest
Section titled “Input: UnarchiveRoomRequest”Request to unarchive a room.
| Field | Type | Description |
|---|---|---|
room_id | string | Required. Room to unarchive. |
Result: UnarchiveRoomResponse
Section titled “Result: UnarchiveRoomResponse”Result of unarchiving a room.
| Field | Type | Description |
|---|---|---|
room | Room | Unarchived room. |
JoinRoom
Section titled “JoinRoom”Joins the room as the current user when room permissions allow it.
POST /api/connect/chatto.api.v1.RoomService/JoinRoomInput: JoinRoomRequest
Section titled “Input: JoinRoomRequest”Request to join a room as the current user.
| Field | Type | Description |
|---|---|---|
room_id | string | Required. Room to join. |
Result: JoinRoomResponse
Section titled “Result: JoinRoomResponse”Result of joining a room.
| Field | Type | Description |
|---|---|---|
room | Room | Joined room. |
JoinRoomGroup
Section titled “JoinRoomGroup”Joins every unarchived room in a group that the current user can join. Already-joined and non-joinable rooms are skipped.
POST /api/connect/chatto.api.v1.RoomService/JoinRoomGroupInput: JoinRoomGroupRequest
Section titled “Input: JoinRoomGroupRequest”Request to join all joinable rooms in one room group.
| Field | Type | Description |
|---|---|---|
group_id | string | Required. Room group whose rooms should be joined. |
Result: JoinRoomGroupResponse
Section titled “Result: JoinRoomGroupResponse”Result of joining all joinable rooms in one room group.
| Field | Type | Description |
|---|---|---|
joined_room_ids | repeated string | Room IDs that transitioned from not joined to joined. |
StartDM
Section titled “StartDM”Starts or fetches a direct-message room for the current user and the requested participant set. The caller must be allowed to start DMs.
POST /api/connect/chatto.api.v1.RoomService/StartDMInput: StartDMRequest
Section titled “Input: StartDMRequest”Request to start or fetch a direct-message room.
| Field | Type | Description |
|---|---|---|
participant_ids | repeated string | Other participants to include in the direct-message room. The current user is always included by the server. An empty list creates or fetches the caller’s self-DM. |
Result: StartDMResponse
Section titled “Result: StartDMResponse”Result of starting or fetching a direct-message room.
| Field | Type | Description |
|---|---|---|
room | Room | Direct-message room for the participant set. |
LeaveRoom
Section titled “LeaveRoom”Leaves the room as the current user. Direct-message and universal rooms cannot be left.
POST /api/connect/chatto.api.v1.RoomService/LeaveRoomInput: LeaveRoomRequest
Section titled “Input: LeaveRoomRequest”Request to leave a room as the current user.
| Field | Type | Description |
|---|---|---|
room_id | string | Required. Room to leave. |
Result: LeaveRoomResponse
Section titled “Result: LeaveRoomResponse”Result of leaving a room.
| Field | Type | Description |
|---|---|---|
left | bool | True when the current user is no longer an explicit member after the call. |
ListMembers
Section titled “ListMembers”Lists explicit members of a room. The caller must be a member of the room.
POST /api/connect/chatto.api.v1.RoomService/ListMembersInput: ListRoomMembersRequest
Section titled “Input: ListRoomMembersRequest”Request for members of one room.
| Field | Type | Description |
|---|---|---|
room_id | string | Required. Room whose explicit members should be listed. |
search | string | Optional case-insensitive search against login and display name. |
page | PageRequest | Page request. Defaults to 20 results when absent or limit is zero. |
Result: ListRoomMembersResponse
Section titled “Result: ListRoomMembersResponse”Room member page.
| Field | Type | Description |
|---|---|---|
members | repeated DirectoryMember | Members in the requested page. |
page | PageInfo | Page metadata. |
GetMember
Section titled “GetMember”Gets one explicit member of a room. The caller must be a member of the room. Returns NOT_FOUND when the target is unknown or not a room member.
POST /api/connect/chatto.api.v1.RoomService/GetMemberInput: GetRoomMemberRequest
Section titled “Input: GetRoomMemberRequest”Request one member of one room by stable user ID.
| Field | Type | Description |
|---|---|---|
room_id | string | Required room ID. |
user_id | string | Required target user ID. |
Result: GetRoomMemberResponse
Section titled “Result: GetRoomMemberResponse”Room member response.
| Field | Type | Description |
|---|---|---|
member | DirectoryMember | Requested room member. |
BatchGetMembers
Section titled “BatchGetMembers”Gets explicit room member rows for multiple users. The caller must be a member of the room.
POST /api/connect/chatto.api.v1.RoomService/BatchGetMembersInput: BatchGetRoomMembersRequest
Section titled “Input: BatchGetRoomMembersRequest”Request room member rows for a set of stable user IDs.
| Field | Type | Description |
|---|---|---|
room_id | string | Required room ID. |
user_ids | repeated string | Required target user IDs. Unknown IDs and users that are not members of the room are omitted from the response. |
Result: BatchGetRoomMembersResponse
Section titled “Result: BatchGetRoomMembersResponse”Batch room member response.
| Field | Type | Description |
|---|---|---|
members | repeated DirectoryMember | Found members. The server preserves first-seen request order and de-duplicates repeated IDs. |
AddMember
Section titled “AddMember”Adds a user as an explicit member of a channel room. The caller must be allowed to manage the room. Direct-message and universal rooms cannot be managed this way.
POST /api/connect/chatto.api.v1.RoomService/AddMemberInput: AddMemberRequest
Section titled “Input: AddMemberRequest”Request to add a user to a channel room.
| Field | Type | Description |
|---|---|---|
room_id | string | Required. Channel room to add the user to. |
user_id | string | Required. User to add as an explicit room member. |
Result: AddMemberResponse
Section titled “Result: AddMemberResponse”Result of adding a user to a room.
| Field | Type | Description |
|---|---|---|
member | DirectoryMember | Added room member. |
RemoveMember
Section titled “RemoveMember”Removes a user from a channel room’s explicit members. The caller must be allowed to manage the room. Direct-message and universal rooms cannot be managed this way.
POST /api/connect/chatto.api.v1.RoomService/RemoveMemberInput: RemoveMemberRequest
Section titled “Input: RemoveMemberRequest”Request to remove a user from a channel room.
| Field | Type | Description |
|---|---|---|
room_id | string | Required. Channel room to remove the user from. |
user_id | string | Required. User to remove from the room’s explicit members. |
Result: RemoveMemberResponse
Section titled “Result: RemoveMemberResponse”Result of removing a user from a room.
| Field | Type | Description |
|---|---|---|
removed | bool | True when an explicit room membership was removed by this call. |
ListBans
Section titled “ListBans”Lists active channel room bans. The caller must be allowed to moderate room membership bans.
POST /api/connect/chatto.api.v1.RoomService/ListBansInput: ListBansRequest
Section titled “Input: ListBansRequest”Request to list active room bans.
| Field | Type | Description |
|---|---|---|
room_id | string | Optional channel room filter. Empty lists active bans across all rooms. |
page | PageRequest | Page request. Defaults are applied when absent or limit is zero. |
Result: ListBansResponse
Section titled “Result: ListBansResponse”Active room bans visible to the current moderator.
| Field | Type | Description |
|---|---|---|
bans | repeated RoomBan | Active bans, newest first. |
page | PageInfo | Page metadata. |
ListRoomAttachments
Section titled “ListRoomAttachments”Lists current message-owned room attachments. Authentication and room membership are required. Returns PERMISSION_DENIED when the room is inaccessible to the caller.
POST /api/connect/chatto.api.v1.RoomService/ListRoomAttachmentsInput: ListRoomAttachmentsRequest
Section titled “Input: ListRoomAttachmentsRequest”Request for room-scoped attachment list pages.
| Field | Type | Description |
|---|---|---|
room_id | string | Required room ID. |
thumbnail | ImageTransformOptions | Thumbnail URL options. Defaults are applied when absent. |
page | PageRequest | Page request. Defaults are applied when absent or limit is zero. |
Result: ListRoomAttachmentsResponse
Section titled “Result: ListRoomAttachmentsResponse”Room-scoped attachment list response.
| Field | Type | Description |
|---|---|---|
attachments | repeated RoomAttachmentListItem | Current attachments in newest message order. |
page | PageInfo | Page metadata. |
UpdateTypingIndicator
Section titled “UpdateTypingIndicator”Refreshes the current user’s live-only typing indicator for a room or thread. Room membership is required; message posting permission is not.
POST /api/connect/chatto.api.v1.RoomService/UpdateTypingIndicatorInput: UpdateTypingIndicatorRequest
Section titled “Input: UpdateTypingIndicatorRequest”Request to refresh the current user’s live-only typing indicator.
| Field | Type | Description |
|---|---|---|
room_id | string | Required. Room where the current user is typing. |
thread_root_event_id | string | Event ID of the thread root when typing inside a thread. |
Result: UpdateTypingIndicatorResponse
Section titled “Result: UpdateTypingIndicatorResponse”Result of refreshing a typing indicator.
| Field | Type | Description |
|---|---|---|
updated | bool | True when the typing indicator was accepted for publish. |
GetRoomEvents
Section titled “GetRoomEvents”Returns one page of room timeline events, including related user data needed to render the page.
POST /api/connect/chatto.api.v1.RoomService/GetRoomEventsInput: GetRoomEventsRequest
Section titled “Input: GetRoomEventsRequest”Request for a page of room timeline events.
Omit the cursor to load the initial page. Set before to a previously returned start_cursor to page toward older events, or after to a previously returned end_cursor to page toward newer events.
| Field | Type | Description |
|---|---|---|
room_id | string | Required. Room whose timeline should be loaded. |
limit | int32 | Maximum number of events to return. The server may clamp very large limits. |
cursor.before | string | Return events older than this opaque cursor. |
cursor.after | string | Return events newer than this opaque cursor. |
Result: GetRoomEventsResponse
Section titled “Result: GetRoomEventsResponse”Response containing one room timeline page.
| Field | Type | Description |
|---|---|---|
page | RoomTimelinePage | Loaded timeline page. |
GetRoomEventsAround
Section titled “GetRoomEventsAround”Returns a room timeline window centered around a specific event. Use this to open a permalink, search result, or notification target in context. Returns NOT_FOUND when the anchor event is missing or not visible in the room timeline and PERMISSION_DENIED when the room is inaccessible.
POST /api/connect/chatto.api.v1.RoomService/GetRoomEventsAroundInput: GetRoomEventsAroundRequest
Section titled “Input: GetRoomEventsAroundRequest”Request for room timeline events around a specific event.
Use this when a client needs to jump to a known event and render enough context around it.
| Field | Type | Description |
|---|---|---|
room_id | string | Required. Room whose timeline should be loaded. |
event_id | string | Required. Anchor event ID that should appear in the returned page. |
limit | int32 | Maximum number of events to return around the anchor. |
Result: GetRoomEventsAroundResponse
Section titled “Result: GetRoomEventsAroundResponse”Response containing a room timeline window around a specific event.
| Field | Type | Description |
|---|---|---|
page | RoomTimelinePage | Loaded timeline page. |
target_index | int32 | Zero-based index of the anchor event within page.events. |
MarkRoomAsRead
Section titled “MarkRoomAsRead”Marks a room timeline as read through the supplied event. If no event is supplied, the server marks through the room’s latest root event. Clients usually call this after the user has viewed the latest visible event in the room.
POST /api/connect/chatto.api.v1.RoomService/MarkRoomAsReadInput: MarkRoomAsReadRequest
Section titled “Input: MarkRoomAsReadRequest”Request to mark a room timeline as read.
| Field | Type | Description |
|---|---|---|
room_id | string | Required. Room whose timeline should be marked read. |
up_to_event_id | string | Highest room event ID the current user has read. When set, the event must exist as a root event in the room timeline. Leave empty to mark through the room’s current latest root event. |
Result: MarkRoomAsReadResponse
Section titled “Result: MarkRoomAsReadResponse”Result of marking a room timeline as read.
Clients can use the previous timestamp to decide whether unread badges or local notification state need to be reconciled.
| Field | Type | Description |
|---|---|---|
last_read_at | google.protobuf.Timestamp | New room read timestamp stored for the current user. |
previous_last_read_at | google.protobuf.Timestamp | Previous room read timestamp, when one existed. |
BanMember
Section titled “BanMember”Bans a member from a channel room. Direct-message rooms cannot be moderated this way, and the target must currently be a room member.
POST /api/connect/chatto.api.v1.RoomService/BanMemberInput: BanMemberRequest
Section titled “Input: BanMemberRequest”Request to ban a member from a channel room.
| Field | Type | Description |
|---|---|---|
room_id | string | Required. Channel room to ban the user from. |
user_id | string | Required. User to ban from the room. |
reason | string | Required moderator-entered reason stored for audit. |
expires_at | google.protobuf.Timestamp | Optional future time when the ban expires. |
Result: BanMemberResponse
Section titled “Result: BanMemberResponse”Result of banning a room member.
| Field | Type | Description |
|---|---|---|
banned | bool | True when the ban operation completed. |
UnbanMember
Section titled “UnbanMember”Removes an active channel room ban. Calling this when no active ban exists is allowed and still returns success.
POST /api/connect/chatto.api.v1.RoomService/UnbanMemberInput: UnbanMemberRequest
Section titled “Input: UnbanMemberRequest”Request to remove a channel room ban.
| Field | Type | Description |
|---|---|---|
room_id | string | Required. Channel room to unban the user from. |
user_id | string | Required. User to unban. |
reason | string | Required moderator-entered reason stored for audit. |
Result: UnbanMemberResponse
Section titled “Result: UnbanMemberResponse”Result of removing a room ban.
| Field | Type | Description |
|---|---|---|
unbanned | bool | True when the unban operation completed. |