Gen-Endpoint

Free Real-time Chat API — Mock REST API for Testing & Development

Communication
4 Endpoints
Live & Active

Provides chat room listings, message history, user typing indicators, and message dispatch endpoints for chat UI development.

Internal API - Hosted by Gen-Endpoint

Interactive Live API Explorer

Explore, configure parameters, and execute live HTTP requests directly in your browser. All routes are active!
GET

/api/chat/rooms

List available chat rooms with participant counts.

Try it live in browser

You can add or change query parameters in the path above (e.g., ?name=User).

POST

/api/chat/rooms

Create new chat room with customizable settings.

Try it live in browser
GET

/api/chat/rooms/{roomId}/messages

Get message history for room with pagination. Replace {roomId} with an actual ID.

Try it live in browser

Replace placeholders (e.g., {userId}) with actual values in the path above. You can also add/edit query parameters (e.g., ?key=value).

POST

/api/chat/rooms/{roomId}/messages

Send message to chat room. Replace {roomId} with an actual ID.

Try it live in browser

Replace placeholders (e.g., {userId}) with actual values in the path above.

Code Integration Examples

Copy ready-to-use cURL commands and JavaScript Fetch snippets directly into your projects or testing tools.
Standard Fetch API (Browser & Node.js 18+)
// Free Real-time Chat API - JavaScript Fetch Example
async function fetchRealtimeChatAPI() {
  try {
    const response = await fetch('https://gen-endpoint.com/api/chat/rooms', {
      method: 'GET',
      headers: {
        'Content-Type': 'application/json',
      },
    });

    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }

    const data = await response.json();
    console.log('Success:', data);
    return data;
  } catch (error) {
    console.error('Fetch error:', error);
  }
}

fetchRealtimeChatAPI();

Sample JSON Response

[
  {
    "id": "room_1",
    "name": "General Discussion",
    "description": "Main chat room for all users",
    "participants": 45,
    "lastActivity": "2024-08-16T12:00:00Z",
    "type": "public"
  },
  {
    "id": "room_2",
    "name": "Tech Support",
    "description": "Get help with technical issues",
    "participants": 12,
    "lastActivity": "2024-08-16T11:30:00Z",
    "type": "public"
  }
]

Common Developer Use Cases

How developers integrate the Real-time Chat API during rapid frontend prototyping and automated testing.

Building instant messaging feeds and chat bubbles.

Testing message pagination and scroll-to-bottom behavior.

Related Free REST APIs

Explore complementary mock endpoints to chain and test full application workflows.

Notification System API

Communication

Send emails, SMS, and push notifications with template support and delivery tracking.

View API

Comments & Reviews API

Social

Handle user comments, reviews, ratings, moderation, and threaded discussions.

View API

User Management API

Application

A comprehensive API for managing user accounts, including CRUD operations.

View API

Frequently Asked Questions

Can I fetch room messages?

Yes, call GET /api/chat/rooms/{roomId}/messages for message histories.