RealTimeX
Start For Free

RealTimeX

API Documentation

IntroductionAuthenticationBase URLHeadersError codes
ListGet infoAttachmentsAttachments summaryCreate groupGroup adminsGroup permissionsGroup informationGroup participants
Sample requestsSample responsesStatus codesAppendixChangelog

API Reference

Get Conversation Info

Overview

Fetch full details for a single conversation by conversationId — for chat headers, group info panels, participant lists, and permission-aware UI inside the messaging client.

Returns hydrated participant names, group title and description, admin list, and permission flags so you can show or hide actions like edit info, add members, or send messages.

When to use this endpoint?

Use Get Conversation Info when:

  • Opening a conversation thread and rendering the header (group name, DM partner, or avatar stack).
  • Showing the group info sheet — description, admins, and participant roster.
  • Reading groupPermissions before enabling compose, edit, or member-management actions.
  • Refreshing conversation metadata after a group update or member change.

Part of the Chat Conversation APIs for the chat package/SDK (not Platform → Conversations). Requires a chat user Access Token for the signed-in messaging participant.

Response Data

The data object typically includes:

FieldDescription
_idConversation id (same as path conversationId).
conversationTypeindividual or group. Group-only fields apply when the type is group.
participantsArray of participant objects with _id and name for the roster and chat header.
groupNameGroup display title shown in the header and info panel.
groupDescriptionGroup description text. May be an empty string when unset.
groupAdminsArray of group admins. Empty when no admins are assigned yet.
groupPermissionsPermission object for the group. Includes onlyAdminCanSendMessage, onlyAdminCanEditInfo, senderCanEditMessage, allowMemberAdd, allowMemberRemove, and moderationEnabled — use these to enable or disable chat UI actions.
createdAt / updatedAtISO timestamps for when the conversation was created and last updated.
GET{baseUrl}/api/{apiVersion}/conversation/get/information/:conversationId

Authentication

Required (Bearer token)

Tenant-scoped

Yes (tenant DB — requires x-client-id)

Request Headers

HeaderValueDescription
AuthorizationBearer <access_token>Chat user Access Token (Bearer) for the signed-in messaging participant.
is-tenanttrueTargets the tenant DB ("true", needs x-client-id).
x-client-id{{clientId}}Tenant (client) id. Required when is-tenant=true.

Path Parameters

ParameterExampleDescription
conversationId6a4b35cacb34924dcbc03f8bThe conversation's _id (24-char Mongo ObjectId).

Success Response (HTTP 200 OK)

On success, data contains the conversation record. The example below is a group with participants, group info, an empty admin list, and permission flags.

json
{
  "success": true,
  "message": "Conversation information fetched successfully",
  "data": {
    "_id": "6a4b...3f8b",
    "conversationType": "group",
    "participants": [
      {
          "_id": "6a47...aadb",
          "name": "Iraa"
      },
      {
          "_id": "6a4a...3985",
          "name": "Riva R"
      }
    ],
    "groupName": "Group Name",
    "groupDescription": "Group Description",
    "groupAdmins": [],
    "groupPermissions": {
      "onlyAdminCanSendMessage": false,
      "onlyAdminCanEditInfo": false,
      "senderCanEditMessage": true,
      "allowMemberAdd": false,
      "allowMemberRemove": false,
      "moderationEnabled": false
    },
    "createdAt": "2026-07-06T04:57:46.196Z",
    "updatedAt": "2026-07-10T09:39:25.210Z"
  },
  "error": null
}

Common Errors

Get fails when the token is missing, the conversation does not exist, or the user is not allowed to view it.

HTTP 401 Unauthorized — No token

json
{
  "success": false,
  "message": "No token, authorization denied",
  "data": null,
  "error": "Unauthorized"
}

HTTP 404 Not Found — Conversation missing

json
{
  "success": false,
  "message": "Conversation not found",
  "data": null,
  "error": null
}

HTTP 403 Forbidden — Access denied

json
{
  "success": false,
  "message": "Access denied: insufficient permissions",
  "data": null,
  "error": null
}
CodeReason
401 UnauthorizedAccess Token is missing, invalid, or expired.
404 Not FoundNo conversation exists for the given conversationId in this tenant.
403 ForbiddenSigned-in user is not a participant or lacks permission to view this conversation.
500 Internal Server ErrorAn unexpected error occurred while fetching conversation info.

Best Practices

  • Validate conversationId is a 24-character ObjectId before calling the API.
  • Cache conversation info per thread; refetch when opening the group info sheet or after membership changes.
  • Gate compose, edit, and member actions on groupPermissions rather than hard-coding role checks in the client.
  • For DMs, derive the display title from the other participant in participants (exclude the signed-in user id).
  • Always send tenant headers with the chat user Bearer token over HTTPS.

Conversation header ready

Render the chat header and group info panel from this payload. Use Conversation Attachments or Attachments Summary for the shared media gallery.

PreviousListNextAttachments

On this page

OverviewWhen to use this endpoint?Response DataRequest HeadersPath ParametersSuccess ResponseCommon ErrorsBest Practices