List chat rooms
GET
/chat-roomsList the chat rooms the authenticated user belongs to, including unread counts and the latest message.
| Auth | Login required |
|---|
Query parameters
pagenumberPage number (1-based). Default 1.
perPagenumberItems per page. Default 20.
communityIdstringFilter by community ID.
qstringPartial match on room or member name.
Response
| Field | Type | Description |
|---|---|---|
chatRooms | ChatRoom[] | Array of chat rooms. |
pageInfo | object | Pagination 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 }}