メッセージ一覧

GET/chat-rooms/:roomId/messages

チャットルームのメッセージをカーソルページネーションで返します。ルームのメンバーのみアクセスできます。

認証要ログイン

パスパラメータ

roomIdstring必須

チャットルーム ID。

クエリパラメータ

limitnumber

取得件数(最大 100)。デフォルト 50。

cursorstring

前回のレスポンスの nextCursor。過去方向へ遡る。

レスポンス

フィールド説明
messagesMessage[]メッセージの配列(新しい順)
nextCursorstring | null次のページのカーソル。無い場合は null。
リクエスト
curl https://api.4s.link/chat-rooms/ROOM_ID/messages \
-H "Authorization: Bearer 4s_at_..."
レスポンス例
{
"messages": [
{
"id": "m1a2b3c4-...",
"type": "USER",
"content": "よろしくお願いします",
"imageUrl": null,
"createdAt": "2026-08-18T00:00:00.000Z",
"user": { "id": "a1b2c3d4-...", "slug": "taro", "firstName": "太郎", "lastName": "山田", "avatarUrl": "https://.../avatar.png" }
}
],
"nextCursor": "m0z9y8x7-..."
}