Base URL
All API endpoints are relative to your application’s base URL:Authentication
Most API endpoints require authentication using a token-based system. Authentication is handled through cookies.Authentication requirements
- Room ID: A unique identifier for the chat room (passed as query parameter)
- Auth token: A token stored in the
x-auth-tokencookie that identifies the user
Unauthenticated endpoints
POST /api/room/create- Creates a new room without authentication
Authenticated endpoints
All other endpoints require:- Valid
roomIdquery parameter - Valid
x-auth-tokencookie - The token must be in the room’s connected users list
401 Unauthorized response:
Rate limiting and TTL
Rooms are ephemeral and expire after 10 minutes of inactivity. When you send messages or interact with a room, the TTL (time to live) is maintained but not extended.Error handling
The API returns standard HTTP status codes:200- Success401- Unauthorized (missing or invalid authentication)500- Server error
Next steps
Rooms
Create and manage chat rooms
Messages
Send and retrieve messages