## Retrieve a message `$client->messages->retrieve(string messageID, string chatID): Message` **get** `/v1/chats/{chatID}/messages/{messageID}` Retrieve a message by final message ID, pendingMessageID, or Matrix event ID. chatID may be a Beeper chat ID or a local chat ID. ### Parameters - `chatID: string` Chat ID. Input routes also accept the local chat ID from this installation when available. - `messageID: string` Message ID. ### Returns - `Message` - `string id` Message ID. - `string accountID` Beeper account ID the message belongs to. - `string chatID` Chat ID. Input routes also accept the local chat ID from this installation when available. - `string senderID` Fully qualified sender user ID. Network-backed IDs usually include the network prefix and homeserver. - `string sortKey` A unique, sortable key used to sort messages. - `\Datetime timestamp` Message timestamp. - `?list attachments` Attachments included with this message, if any. - `?\Datetime editedTimestamp` Timestamp when the message was edited, if known. - `?bool isDeleted` True if the message has been deleted. - `?bool isHidden` True if the message is hidden from normal display. - `?bool isSender` True if the authenticated user sent the message. - `?bool isUnread` True if the message is unread for the authenticated user. May be omitted. - `?string linkedMessageID` ID of the message this is a reply to, if any. - `?list links` Link previews included with this message, if any. - `?list mentions` Mentioned user IDs, @room, or null for legacy messages that require text scanning. - `?list reactions` Reactions to the message, if any. - `?Seen seen` Read receipt state for this message, when available. - `?string senderName` Resolved sender display name. - `?SendStatus sendStatus` Message send status for this message, when reported by the bridge. - `?string text` Rich-text message body if present. - `?Type type` Message content type. Useful for distinguishing reactions, media messages, and state events from regular text messages. ### Example ```php messages->retrieve( '1343993', chatID: '!NCdzlIaMjZUmvmvyHU:beeper.com' ); var_dump($message); ``` #### Response ```json { "id": "241392", "accountID": "discordgo", "chatID": "!discord_109876543210987654:beeper.com", "senderID": "@discord_221590782384013314:beeper.com", "sortKey": "455171049984", "timestamp": "2026-05-05T20:20:12.497Z", "attachments": [ { "type": "unknown", "id": "id", "duration": 0, "fileName": "fileName", "fileSize": 0, "isGif": true, "isSticker": true, "isVoiceNote": true, "mimeType": "mimeType", "posterImg": "posterImg", "size": { "height": 0, "width": 0 }, "srcURL": "srcURL", "transcription": { "engine": "engine", "transcription": "transcription", "language": "language" } } ], "editedTimestamp": "2025-08-31T23:30:12.520Z", "isDeleted": false, "isHidden": true, "isSender": false, "isUnread": false, "linkedMessageID": "1343993", "links": [ { "title": "title", "url": "url", "favicon": "favicon", "img": "img", "imgSize": { "height": 0, "width": 0 }, "originalURL": "originalURL", "summary": "summary" } ], "mentions": [ "@discord_337451892017545216:beeper.com" ], "reactions": [ { "id": "id", "participantID": "participantID", "reactionKey": "reactionKey", "emoji": true, "imgURL": "imgURL" } ], "seen": true, "senderName": "Kishan Bagaria", "sendStatus": { "status": "SUCCESS", "timestamp": "2025-08-31T23:30:12.520Z", "deliveredToUsers": [ "string" ], "internalError": "internalError", "message": "message", "reason": "reason" }, "text": "The OAuth fix is deployed. Can you verify the desktop flow?", "type": "TEXT" } ```