## List **get** `/v1/chats/{chatID}/messages` List all messages in a chat with cursor-based pagination. Sorted by timestamp. ### Path Parameters - `chatID: string` Unique identifier of the chat. ### Query Parameters - `cursor: optional string` Opaque pagination cursor; do not inspect. Use together with 'direction'. - `direction: optional "after" or "before"` Pagination direction used with 'cursor': 'before' fetches older results, 'after' fetches newer results. Defaults to 'before' when only 'cursor' is provided. - `"after"` - `"before"` ### Returns - `hasMore: boolean` True if additional results can be fetched. - `items: array of Message` Messages from the chat, sorted by timestamp. Use message.sortKey as the cursor for pagination and treat it as an opaque value. - `id: string` Message ID. - `accountID: string` Beeper account ID the message belongs to. - `chatID: string` Unique identifier of the chat. - `senderID: string` Sender user ID. - `sortKey: string` A unique, sortable key used to sort messages. - `timestamp: string` Message timestamp. - `attachments: optional array of Attachment` Attachments included with this message, if any. - `type: "unknown" or "img" or "video" or "audio"` Attachment type. - `"unknown"` - `"img"` - `"video"` - `"audio"` - `id: optional string` Attachment identifier (typically an mxc:// URL). Use with /v1/assets/download to get a local file path. - `duration: optional number` Duration in seconds (audio/video). - `fileName: optional string` Original filename if available. - `fileSize: optional number` File size in bytes if known. - `isGif: optional boolean` True if the attachment is a GIF. - `isSticker: optional boolean` True if the attachment is a sticker. - `isVoiceNote: optional boolean` True if the attachment is a voice note. - `mimeType: optional string` MIME type if known (e.g., 'image/png'). - `posterImg: optional string` Preview image URL for video attachments (poster frame). May be temporary or local-only to this device; download promptly if durable access is needed. - `size: optional object { height, width }` Pixel dimensions of the attachment: width/height in px. - `height: optional number` - `width: optional number` - `srcURL: optional string` Public URL or local file path to fetch the asset. May be temporary or local-only to this device; download promptly if durable access is needed. - `isSender: optional boolean` True if the authenticated user sent the message. - `isUnread: optional boolean` True if the message is unread for the authenticated user. May be omitted. - `linkedMessageID: optional string` ID of the message this is a reply to, if any. - `reactions: optional array of Reaction` Reactions to the message, if any. - `id: string` Reaction ID, typically ${participantID}${reactionKey} if multiple reactions allowed, or just participantID otherwise. - `participantID: string` User ID of the participant who reacted. - `reactionKey: string` The reaction key: an emoji (😄), a network-specific key, or a shortcode like "smiling-face". - `emoji: optional boolean` True if the reactionKey is an emoji. - `imgURL: optional string` URL to the reaction's image. May be temporary or local-only to this device; download promptly if durable access is needed. - `senderName: optional string` Resolved sender display name (impersonator/full name/username/participant name). - `text: optional string` Plain-text body if present. May include a JSON fallback with text entities for rich messages. - `type: optional "TEXT" or "NOTICE" or "IMAGE" or 7 more` Message content type. Useful for distinguishing reactions, media messages, and state events from regular text messages. - `"TEXT"` - `"NOTICE"` - `"IMAGE"` - `"VIDEO"` - `"VOICE"` - `"AUDIO"` - `"FILE"` - `"STICKER"` - `"LOCATION"` - `"REACTION"` ### Example ```http curl http://localhost:23373/v1/chats/$CHAT_ID/messages ```