TagMangoTagMango Docs
Community

List your community chat rooms

GET
/api/v1/external/community/chatrooms

List every chat room in your community — the shared chat tied to each of your community channels, plus every direct-message room you, the creator, are personally a participant in. Ordered by the most recently active room first. Not paginated: every room you can see is returned in one response, with your own unread counts, last-seen positions, and mute/stop-receiving state.

Fails with a 400 if the Community feature is not enabled for this creator.

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.

AuthorizationBearer <token>

In: header

Header Parameters

x-whitelabel-host*string

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" \  -H "x-whitelabel-host: string"
{
  "chatRooms": [
    {
      "_id": "6659ca9e5f2acb7abfdcd8fd",
      "roomType": "channel",
      "pinnedMessages": [
        "6659ca9e5f2acb7abfdcd8fd"
      ],
      "channel": {
        "name": "My Awesome Channel",
        "description": "This channel is about...",
        "communityProfilePicture": "https://example.com/image.jpg",
        "communityProfilePictureType": "image",
        "_id": "string"
      },
      "participants": [
        {
          "name": "John Doe",
          "profilePicUrl": "https://linktoprofilepic.com/pic.jpg",
          "_id": "6659ca9e5f2acb7abfdcd8fd"
        }
      ],
      "lastMessage": {
        "_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"
          }
        ]
      },
      "lastSeen": "6659ca9e5f2acb7abfdcd8fd",
      "unreadCount": 5,
      "messageNotificationsMuted": false,
      "selfStopReceivingMessages": false,
      "otherStopReceivingMessages": false
    }
  ],
  "totalChatRooms": 3
}
{
  "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
}