List messages in one of your community chat rooms
List messages from one chat room — a channel-linked room or a direct-message room you, the creator, are personally a participant in. This is cursor-based, not page-based: mode says which slice of the room's history to fetch relative to messageId, and messages are always returned oldest first, regardless of mode.
roomId must be a room you can already see via the chat-room listing endpoint — there's no separate join/membership step. A roomId that doesn't exist, or a channel-linked room whose channel you don't have access to, or a direct-message room you're not a participant in, all fail with a 404, indistinguishable from each other.
Deleted messages are still included in the slice, with isDeleted: true — this endpoint does not filter them out or clear their message text, so build your own "message deleted" handling around the isDeleted flag rather than assuming the field is blanked.
Every message is personalized to you: isPinned reflects the room's current pinned state, and myReaction carries your own active reaction (absent if you haven't reacted to that message).
Fails with a 400 if the Community feature is not enabled for this creator, or a 404 if roomId (or messageId, for modes that require one) doesn't exist or isn't yours to see.
External access policy
An API key and an authorized white-label host are required. Both tier and plan requirements are enforced.
These requirements apply to the white-label creator for backend-to-backend access. TagMango platform access is not supported.
-
Plans: Unrestricted.
-
Tiers: Unrestricted.
Authorization
bearer In: header
Query Parameters
Which slice of the room to fetch, relative to messageId — one of: before-message, after-message, around-last-seen, around-message, from-start, latest. from-start: the oldest limit messages in the room, oldest first. No messageId needed. latest: the newest limit messages in the room, returned oldest first. No messageId needed. before-message: the limit messages immediately before messageId (which is excluded), oldest first — for scrolling further into the past. after-message: the limit messages immediately after messageId (which is excluded), oldest first — for scrolling forward again. around-message: up to limit messages centered on messageId (which is included) — roughly half before it and half after. around-last-seen: the limit messages ending at (and including) the last message you (the creator) have read in this room, oldest first. No messageId needed. If you have never read anything in this room, this falls back to the same result as latest.
"before-message" | "after-message" | "around-last-seen" | "around-message" | "from-start" | "latest"The message to anchor the fetch on. Required for every mode except from-start, latest, and around-last-seen. A messageId that does not exist in this room fails with a 404.
Maximum number of messages to return. Defaults to 10, capped at 100.
10Header Parameters
Host name of the dashboard, ex: mydomain.tagmango.com
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://api-prod-new.tagmango.com/api/v1/external/community/chatrooms/{roomId}/messages?mode=latest" \ -H "x-whitelabel-host: string"{
"messages": [
{
"_id": "6659ca9e5f2acb7abfdcd8fd",
"room": "6659ca9e5f2acb7abfdcd8fd",
"message": "Hello, how are you?",
"edited": true,
"isDeleted": true,
"lastEditedAt": "2021-08-01T00:00:00.000Z",
"isThreadRoot": true,
"threadRoot": "6659ca9e5f2acb7abfdcd8fd",
"threadRootMetadata": {
"firstFiveRepliers": [
"6659ca9e5f2acb7abfdcd8fd"
],
"totalReplies": 5,
"lastRepliedAt": "2021-08-01T00:00:00.000Z",
"lastReply": "6659ca9e5f2acb7abfdcd8fd"
},
"reactions": {
"😄": 5,
"🚀": 2,
"❤️": 10
},
"createdAt": "2021-08-01T00:00:00.000Z",
"updatedAt": "2021-08-01T00:00:00.000Z",
"poll": "6659ca9e5f2acb7abfdcd8fd",
"pollMetadata": {
"creator": "6659ca9e5f2acb7abfdcd8fd",
"question": "What is your favorite color?",
"description": "Choose your favorite color",
"pollOptions": [
{
"optionContent": "string",
"optionNumber": 0,
"optionId": "string"
}
],
"pollEndAt": "2021-08-01T00:00:00.000Z",
"pollVotesPerOption": {
"id1": 5,
"id2": 2,
"id3": 10
},
"isResultVisibleToMembers": true,
"allowVoteChange": true,
"pollStartAt": "2021-08-01T00:00:00.000Z"
},
"sender": {
"name": "John Doe",
"profilePicUrl": "https://linktoprofilepic.com/pic.jpg",
"_id": "6659ca9e5f2acb7abfdcd8fd",
"isModerator": false
},
"assets": [
{
"asset": "6659ca9e5f2acb7abfdcd8fd",
"type": "image",
"contentUrl": "https://example.com/image.jpg",
"fileName": "filename.jpg",
"fileSize": 1024,
"fileType": "jpg"
}
],
"isPinned": false,
"myReaction": "string"
}
]
}{
"code": 400,
"type": "Bad Request",
"statusMessage": "BAD_REQUEST",
"success": false,
"message": "Invalid request",
"result": "Invalid request"
}{
"code": 401,
"type": "Unauthorized",
"statusMessage": "UNAUTHORIZED",
"message": "Invalid token",
"result": "Invalid token",
"success": false
}{
"code": 403,
"type": "Forbidden",
"statusMessage": "FORBIDDEN",
"errorCode": "WORKSHOP_MANGO_FORBIDDEN",
"message": "You can not access this api with a TagMango account, only available for whitelabel hosts",
"result": "You can not access this api with a TagMango account, only available for whitelabel hosts",
"success": false
}{
"code": 429,
"type": "Too Many Requests",
"statusMessage": "TOO_MANY_REQUESTS",
"message": "Request limit exceeded. try after 10 seconds",
"result": "Request limit exceeded. try after 10 seconds",
"success": false
}