List chat rooms

GET/chat-rooms

List the chat rooms the authenticated user belongs to, including unread counts and the latest message.

AuthLogin required

Query parameters

pagenumber

Page number (1-based). Default 1.

perPagenumber

Items per page. Default 20.

communityIdstring

Filter by community ID.

qstring

Partial match on room or member name.

Response

FieldTypeDescription
chatRoomsChatRoom[]Array of chat rooms.
pageInfoobjectPagination info.
Request
curl https://api.4s.link/chat-rooms \
-H "Authorization: Bearer 4s_at_..."
Example response
{
"chatRooms": [
{
"id": "r1a2b3c4-...",
"type": "GROUP",
"name": "Project Team",
"members": [
{
"id": "rm1a2b3-...",
"status": "JOINED",
"user": { "id": "a1b2c3d4-...", "slug": "taro", "firstName": "太郎", "lastName": "山田", "avatarUrl": "https://.../avatar.png" }
}
],
"lastMessage": { "id": "m1a2b3c4-...", "content": "よろしくお願いします", "createdAt": "2026-08-18T00:00:00.000Z" },
"unreadCount": 0
}
],
"pageInfo": { "totalCount": 100, "totalPages": 5, "page": 1, "perPage": 20 }
}