Skip to content

Cloud Management API

Roomful’s cloud management layer lets you manage projects, rooms, quota, and API keys through a REST API. It runs alongside the relay server when started with --management-api.

Start a relay with the management API enabled:

Terminal window
roomful relay start --port 8787 --management-api

The management API is served at http://127.0.0.1:8787/api/v1.

All endpoints require a Bearer token or an x-roomful-owner-id header. See the Authentication guide for details.

MethodPathDescription
GET/projectsList all projects visible to the owner
POST/projectsCreate a new project
GET/projects/:projectIdGet a project by ID
PUT/projects/:projectIdUpdate a project
DELETE/projects/:projectIdDelete a project and its rooms
MethodPathDescription
GET/projects/:projectId/roomsList rooms in a project
POST/projects/:projectId/roomsCreate a room
GET/projects/:projectId/rooms/:roomIdGet a room by ID
DELETE/projects/:projectId/rooms/:roomIdDelete a room
MethodPathDescription
GET/projects/:projectId/quotaGet project quota
PUT/projects/:projectId/quotaSet project quota
MethodPathDescription
GET/projects/:projectId/usageGet current usage snapshot
GET/projects/:projectId/usage/eventsQuery usage event history
POST/projects/:projectId/usage/eventsRecord a usage event

The relay tracks usage through typed events:

Event TypeUnitDescription
room.minuteminutesActive room time
peer.connectionconnectionsPeer connections
message.sentmessagesMessages sent through the relay
storage.bytebytesState storage used
recording.minuteminutesRecording duration
ai.actionactionsAI agent actions

The management API supports pluggable storage:

  • InMemory — default, suitable for development and testing
  • PostgreSQL — production-ready with PostgresManagementStore and PostgresUsageEventStore
import { createRelayServer, InMemoryManagementStore, type RelayDefaults } from '@roomful/relay';
import { PostgresManagementStore } from '@roomful/relay';
import { Pool } from 'pg';
const defaults: RelayDefaults = {
maxRooms: 100,
maxPeersPerRoom: 250,
maxTotalPeers: 10000,
messageRateLimit: 20,
messageRateIntervalMs: 1000,
maxEphemeralTtlMs: 86400000,
maxTotalStateBytes: 104857600,
};
const pool = new Pool({ connectionString: process.env.ROOMFUL_DATABASE_URL });
const store = new PostgresManagementStore({ pool, defaults });
const relay = createRelayServer({
port: 8787,
managementApi: { prefix: '/api/v1', store, defaults },
});

A React dashboard is available at apps/dashboard/ for managing projects, rooms, API keys, and viewing usage metrics.

See the Self-Host Deployment Checklist for production deployment guidance including Docker Compose, PostgreSQL, and Redis setup.