#2303·instant

Admin SDK should support publishing topics to rooms

Author: urivaCreated Feb 19, 2026Updated Mar 30, 2026

Problem

The admin SDK (@instantdb/admin) has a Rooms class that only exposes getPresence(). There is no way to publish topics from the server side.

The core SDK (@instantdb/core) supports joinRoom().publishTopic(), but the Reactor constructor has an isClient() guard that returns early when window is not defined, making it unusable in server environments (Node.js, Deno, etc.).

Use case

We're building a chat platform where a backend endpoint needs to broadcast ephemeral UI updates (spinner progress, status changes) to connected clients in a specific room. Topics are the perfect fit for this — fire-and-forget, no persistence needed. But since the admin SDK can't publish topics, we're forced to use persistent entities + reactive queries as a workaround, which adds unnecessary DB writes.

Desired behavior

typescript
import { init } from "@instantdb/admin";

const db = init({ appId, adminToken, schema });

// Publish a topic to a room (fire-and-forget to all connected clients)
await db.rooms.publishTopic("conversation", roomId, "uiUpdate", { elementId, percentage: 0.5 });

Current workaround

Using a persistent entity that clients read via useQuery, with manual cleanup of old records.