RealTimeX
Sign inStart for free
RealTimeXAPI Documentationv1
IntroductionAuthenticationBase URLHeadersError codes
GETOverviewGETUsers metricsGETConversations metricsGETMessages metricsGETOverview v2
Sample requestsSample responsesStatus codesAppendixChangelog
API ReferenceAPI endpointsDashboard

Conversations Metrics

Overview

Retrieve tenant-level conversation counts broken down by type - total conversations, group chats, and individual (direct) conversations.

Use this endpoint for conversation KPI cards or when refreshing only the conversations section of your dashboard.

When to use this endpoint?

Use Conversations Metrics when:

  • You need group vs individual conversation totals for charts or cards.
  • You want a lightweight count without loading the full conversation list.
  • You are refreshing conversation KPIs independently from users or messages.

Requires a client Access Token with tenant admin privileges and tenant headers.

Response Data

FieldTypeDescription
totalnumberTotal conversations in the tenant.
groupnumberCount of group conversations.
individualnumberCount of individual (direct / 1:1) conversations.
GET{baseUrl}/api/{apiVersion}/dashboard/metrics/conversations
Authentication
Required (Bearer token)
Tenant-scoped
Yes (tenant DB - requires x-client-id)

Request Headers

HeaderValueDescription
AuthorizationBearer <access_token>Client Access Token with tenant admin privileges.
is-tenanttrueTargets the tenant DB ("true", needs x-client-id).
x-client-id{{clientId}}Tenant (client) id. Required when is-tenant=true.

Success Response (HTTP 200 OK)

On success, the API returns conversation totals for the tenant.

json
1{2  "success": true,3  "message": "Conversation metrics fetched successfully",4  "data": {5    "total": 342,6    "group": 54,7    "individual": 2888  },9  "error": null10}

Common Errors

CodeReason
401 UnauthorizedAccess Token is missing, invalid, or expired.
403 ForbiddenAccess denied: tenant admin privileges required.
500 Internal Server ErrorAn unexpected error occurred while computing conversation metrics.

Best Practices

  • Use this for conversation-only widgets; use Dashboard Overview for a combined snapshot.
  • Link KPI cards to List Conversations so admins can inspect the underlying data.
  • Always send tenant headers with a client Bearer token over HTTPS.

Conversation metrics ready

Map total, group, and individual to your conversations KPI row. Continue with List Conversations for details.

PreviousUsers metricsNextMessages metrics

On this page

OverviewWhen to use this endpoint?Response DataRequest HeadersSuccess ResponseCommon ErrorsBest Practices
Back to top