RealTimeX
Start For Free

RealTimeX

API Documentation

IntroductionAuthenticationBase URLHeadersError codes
Get settingsUpdate settingsEffective settings
Sample requestsSample responsesStatus codesAppendixChangelog

API Reference

Get Settings

Overview

Fetch the authenticated tenant's Platform settings document — feature toggles, group defaults, message timers, attachment rules, and the plan ceilings in limits.

Use this to hydrate the Platform → Settings screen before the client edits values with Update Settings. Chat apps that only need the resolved runtime config should prefer Effective Settings instead.

When to use this endpoint?

Use Get Settings when:

  • Opening Platform → Settings to show current toggles and limits.
  • Loading the latest document before a PATCH Update so the form is not stale.
  • Displaying plan ceilings from limits next to editable settings controls (for example max file size or group size).
  • Confirming call / push / block / group-creation flags after a save.

Part of the client Platform Settings module. Requires a client Access Token with tenant admin privileges. Not the chat SDK effective settings endpoint.

Response Data

The data object is the full settings document. Treat limits as read-only ceilings; settingsholds the tenant's chosen values (must not exceed those ceilings).

Top-level fields

FieldDescription
_idSettings document id.
clientIdTenant (client) this document belongs to.
limitsPlan / super-admin ceilings. Read-only for the Platform client — use as max values in form validation.
settingsTenant-controlled feature flags and chosen limits (editable via Update Settings).
metadataOptional open object for custom attributes.
createdAt / updatedAtISO timestamps for the document.

limits

FieldDescription
attachmentsCeiling for attachment uploads: enabled, maxFileSizeMB, maxAttachmentsPerMessage, allowedMimeTypes (* = any type).
maxAdminsPerGroupMaximum admins allowed per group under this plan.
maxParticipantsPerGroupMaximum participants allowed per group.
maxPinnedMessagesPerConversationMaximum pinned messages per conversation.
groupCreationEnabledWhether the plan allows group creation at all.

settings — feature toggles & chosen limits

FieldDescription
pushNotificationEnabledWhether push notifications are enabled for the tenant.
videoCallEnabledTenant toggle for video calls (also depends on calls).
audioCallEnabledTenant toggle for audio calls (also depends on calls).
blockUsersEnabledWhether chat users may block other users.
attachmentsTenant's chosen attachment rules (must stay within limits.attachments).
maxAdminsPerGroupChosen max admins per group (capped by limits.maxAdminsPerGroup).
maxParticipantsPerGroupChosen max participants per group (capped by limits.maxParticipantsPerGroup).
maxPinnedMessagesPerConversationChosen max pins per conversation (capped by limits.maxPinnedMessagesPerConversation).
groupCreationEnabledWhether chat users may create groups (also subject to limits.groupCreationEnabled).

settings.calls

FieldDescription
enabledMaster switch for the calling integration (VideoSDK).
videoSdkTokenProvider token. Audio/video toggles only take effect when calls are enabled and a token is saved.

settings.groupPolicy

Seeds default permissions for new groups. Flags listed in locked stay pinned to their default and cannot be overridden per conversation by group admins.

FieldDescription
defaults.onlyAdminCanSendMessageOnly admins may send messages in new groups.
defaults.onlyAdminCanEditInfoOnly admins may edit group name / description / avatar.
defaults.senderCanEditMessageSenders may edit their own messages (subject to timers).
defaults.allowMemberAddNon-admin members may add participants.
defaults.allowMemberRemoveNon-admin members may remove participants.
defaults.moderationEnabledModeration features enabled for new groups.
lockedArray of default flag names that group admins cannot change (empty in the sample).

settings.messageTimers

FieldDescription
dmEditMinutesMinutes a sender can edit a DM after send.
dmDeleteMinutesMinutes a sender can delete a DM after send.
groupEditMinutesMinutes a sender can edit a group message after send.
groupDeleteMinutesMinutes a sender can delete a group message after send.
GET{baseUrl}/api/{apiVersion}/settings

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 (Platform panel).
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 the full settings document, including limits and settings.

json
{
  "success": true,
  "message": "Settings fetched successfully",
  "data": {
    "_id": "6a57...739c",
    "clientId": "6a57...f0c0",
    "__v": 0,
    "createdAt": "2026-07-15T04:45:28.064Z",
    "limits": {
      "attachments": {
        "enabled": true,
        "maxFileSizeMB": 25,
        "maxAttachmentsPerMessage": 10,
        "allowedMimeTypes": ["*"]
      },
      "maxAdminsPerGroup": 5,
      "maxParticipantsPerGroup": 256,
      "maxPinnedMessagesPerConversation": 10,
      "groupCreationEnabled": true
    },
    "metadata": {},
    "settings": {
      "calls": {
        "enabled": false,
        "videoSdkToken": ""
      },
      "groupPolicy": {
        "defaults": {
          "onlyAdminCanSendMessage": false,
          "onlyAdminCanEditInfo": false,
          "senderCanEditMessage": true,
          "allowMemberAdd": false,
          "allowMemberRemove": false,
          "moderationEnabled": false
        },
        "locked": []
      },
      "messageTimers": {
        "dmEditMinutes": 5,
        "dmDeleteMinutes": 10,
        "groupEditMinutes": 10,
        "groupDeleteMinutes": 10
      },
      "attachments": {
        "enabled": true,
        "maxFileSizeMB": 25,
        "maxAttachmentsPerMessage": 10,
        "allowedMimeTypes": ["*"]
      },
      "pushNotificationEnabled": true,
      "videoCallEnabled": true,
      "audioCallEnabled": true,
      "blockUsersEnabled": true,
      "canvasEnabled": true,
      "whiteboardEnabled": true,
      "maxAdminsPerGroup": 5,
      "maxParticipantsPerGroup": 256,
      "maxPinnedMessagesPerConversation": 10,
      "groupCreationEnabled": true
    },
    "updatedAt": "2026-07-15T04:45:28.064Z"
  },
  "error": null
}

Common Errors

Fetch fails when the token is missing/invalid or the caller is not a tenant admin.

HTTP 401 Unauthorized — No token

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

HTTP 403 Forbidden — Tenant admin required

json
{
  "success": false,
  "message": "Access denied: tenant admin privileges required",
  "data": null,
  "error": null
}
CodeReason
401 UnauthorizedAccess Token is missing, invalid, or expired.
403 ForbiddenTenant admin privileges required for Platform Settings.
500 Internal Server ErrorAn unexpected error occurred while fetching settings.

Best Practices

  • Bind form max values from limits so users cannot submit values the API will reject.
  • Refetch after every successful Update so updatedAt and nested objects stay in sync.
  • Treat videoSdkToken as a secret — never log it or expose it in public URLs.
  • Explain groupPolicy.locked in the UI so admins know which defaults cannot be changed per group later.
  • For chat SDK clients that only enforce runtime rules, use Effective Settings instead of this admin document.

Settings loaded

Use data.settings to populate the Platform form and data.limits for ceilings, then call Update Settings to save changes.

PreviousSupport ticketsNextUpdate settings

On this page

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