Connections

Active connections, user management, and room broadcasting API

Connections API

Manage active WebSocket connections, users, and room operations.

Authentication Required: All connection management endpoints require authentication via Bearer token. These are administrative operations.

Get Active Connections

Authentication Required

List all active WebSocket connections in the system. Rate-limited to 30 requests per minute.

Endpoint: GET /api/connections/active

curl -X GET "$BASE_URL/api/connections/active" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

[
  {
    "id": "client_550e8400",
    "clientId": "client_550e8400",
    "userId": "user_123",
    "roomId": "ABC123",
    "presenterName": "John Doe",
    "isHost": true,
    "joinedAt": "2024-01-15T10:30:00Z",
    "connectionStatus": "connected"
  }
]

Kick User

Authentication Required

Forcefully disconnect a user from the system. Rate-limited to 20 requests per minute.

Endpoint: POST /api/connections/{id}/kick

ParameterTypeRequiredDescription
idpathYesClient ID to disconnect
curl -X POST "$BASE_URL/api/connections/client_550e8400/kick" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
  "success": true,
  "message": "Client disconnected"
}

Broadcast to Room

Authentication Required

Send a message to all clients in a room. Rate-limited to 30 requests per minute.

Endpoint: POST /api/connections/rooms/{roomId}/broadcast

ParameterTypeRequiredDescription
roomIdpathYesRoom ID to broadcast to
messagebodyYesMessage content
curl -X POST "$BASE_URL/api/connections/rooms/ABC123/broadcast" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"message":"Session ending in 5 minutes"}'

Response:

{
  "success": true,
  "message": "Message broadcast to 5 clients"
}

Close Room

Authentication Required

Close a room and disconnect all clients. Rate-limited to 10 requests per minute.

Endpoint: POST /api/connections/rooms/{roomId}/close

ParameterTypeRequiredDescription
roomIdpathYesRoom ID to close
curl -X POST "$BASE_URL/api/connections/rooms/ABC123/close" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
  "success": true,
  "message": "Room ABC123 closed, 5 clients disconnected"
}

Rate Limits

EndpointRequests/MinuteBlock Duration
/api/connections/active301-10 minutes
/api/connections/{id}/kick202-30 minutes
/api/connections/rooms/{roomId}/broadcast301-10 minutes
/api/connections/rooms/{roomId}/close103-60 minutes
Repeated rate limit violations result in progressively longer block durations.

Copyright © 2026. All rights reserved.