RealTimeX
Start For Free

RealTimeX

API Documentation

IntroductionAuthenticationBase URLHeadersError codes
Sample requestsSample responsesStatus codesAppendixChangelog

API Reference

Error Codes

Understand RealtimeX API errors, read the response envelope, and look up common messages by endpoint.

Overview

When a request fails, RealtimeX returns a consistent JSON error envelope so your application can handle failures the same way across every endpoint.

Each error includes an HTTP status code and a clear message describing what went wrong. Use the status code to decide how to recover, and use the message to show useful feedback to users or logs.

Success and error responses share the same top-level shape. Check success first, then read message and error when the request fails.

Error Response Format

Failed requests return a body similar to the example below:

json
{
  "success": false,
  "message": "Human-readable error message",
  "data": null,
  "error": "Optional error detail or null"
}

Field reference

FieldDescription
successAlways false for error responses.
messageA human-readable summary of the failure. Safe to surface in UI copy or logs.
dataTypically null when the request fails.
errorOptional extra detail for debugging. May be a short label, validation hint, or null.

How to Handle Errors

A simple, reliable approach for client integrations:

  1. Inspect the HTTP status code to choose the recovery path (retry, re-authenticate, fix input, or show a not-found state).
  2. Read message for the exact reason returned by the API.
  3. Map common messages to user-friendly copy in your product UI when needed.
  4. Log the full response (status, message, and error) for support and debugging—without storing sensitive tokens.

Common Error Codes

The table below lists frequently observed error messages across the RealtimeX API, along with the HTTP status and the endpoints where they commonly appear.

HTTP StatusMessageSeen On
400Current password is incorrectChange Password
400No editable fields providedUpdate Conversation
400conversationIds must be 1-100 valid idsBulk Delete Conversations
400System messages cannot be editedUpdate Message
400messageIds must be 1-100 valid idsBulk Delete Messages
400Invalid roleUpdate User
400userIds must be 1-100 valid idsBulk Delete Users
400Invalid tenant ID or isTenant headerLogin Client User
400Provide at least one of: name, profileImageUpdate My Profile
400No files providedGet Presigned URLs (S3 Upload)
401No token, authorization deniedGet My Profile, Update My Profile +4 more
401Session expiredIs Logged In
403Access denied: insufficient permissionsLogin Client User
403Access denied: tenant admin privileges requiredDashboard Overview, Analytics Overview
404Conversation not foundDelete Conversation, Conversation Attachments +1 more
404Message not foundDelete Message
404Entity not foundUser Role - Get By Id
409A client with this email already existsUpdate Profile
409Email already in use by another userUpdate User
409Cannot delete: 3 user(s) still assigned this roleUser Role - Delete

Status Categories

Use these categories as a quick guide when deciding how your application should respond.

400

Bad Request

The request was malformed or missing required fields. Check the payload, headers, and parameter constraints before retrying.

401

Unauthorized

Authentication failed. Refresh or re-issue the access token, then retry the request with a valid Authorization header.

403

Forbidden

The caller is authenticated but does not have permission. Confirm the user role, tenant privileges, and endpoint scope.

404

Not Found

The requested resource does not exist or is no longer available. Verify the ID and that the resource has not been deleted.

409

Conflict

The request conflicts with the current state of the resource—for example, a duplicate email or a role still assigned to users.

Best Practices

  • Always handle both the HTTP status and the JSON message field.
  • For 401 responses, attempt a token refresh before forcing the user to log in again.
  • Treat 409 conflicts as actionable user feedback (for example, “email already in use”).
  • Do not retry 400 or 403 errors without changing the request.
  • Prefer showing the API message when it is already clear; otherwise map it to friendlier product copy.
PreviousHeadersNextRegister

On this page

OverviewError Response FormatHow to Handle ErrorsCommon Error CodesStatus CategoriesBest Practices