Skip to content
EN

Rooms

Room management. Owner-only operations need a user session (JWT); a room API token with read can read a room’s metadata but cannot perform owner operations.

POST /api/rooms/:roomId
Authorization: Bearer <jwt>
Content-Type: application/json

The first authenticated request for a non-existent room creates it and makes the caller the owner. :roomId must be exactly 10 characters of [A-Za-z0-9_-]. Body fields are optional.

{
"success": true,
"room": { "roomId": "abc123", "createdBy": "auth0|123456", "createdAt": 1700000000000 },
"isNewRoom": true
}
GET /api/rooms/:roomId
Authorization: Bearer <token> (optional for public rooms)

Returns counts and, for authenticated members, userRole and hasAccess. Readable with a read token.

GET /api/rooms/:roomId/info

Metadata used by the map route. Public rooms are readable without authentication; private rooms return requiresAuth: true to non-members. Notable fields: isPublic, presentationIsPublic, autoZoomEnabled, defaultViewLat/Lng/Zoom, defaultTheme, defaultBaseLayer.

PATCH /api/rooms/:roomId/public # body: { "isPublic": true } — owner
PATCH /api/rooms/:roomId/presentation/public # body: { "isPublic": true } — owner or editor

The first makes the whole room publicly viewable; the second makes only the presentation deck public.

GET /api/rooms/:roomId/presentation

Returns a presentation-only snapshot (the objects referenced by saved slides). Public decks are readable without authentication even when the room is private.

PATCH /api/rooms/:roomId/camera-settings — owner
Content-Type: application/json
{
"autoZoomEnabled": false,
"defaultView": { "lat": 47.5596, "lng": 7.5886, "zoom": 13 },
"defaultTheme": "light",
"defaultBaseLayer": "carto"
}

Send null for defaultView/defaultTheme/defaultBaseLayer to clear a saved default. Valid defaultBaseLayer: osm, carto, voyager, satellite, swisstopo, swissimage.

PATCH /api/rooms/:roomId/timeline-settings — owner

Optional fields: groupingMode (none/day/month/year), showMarkersOnly, showAdditionsOnly, dateDisplayMode (event/creation), dateTimeFormat (dmy/mdy/iso), sliderMode (past/current/future).

GET /api/rooms/:roomId/permissions?action=<view|edit|delete|invite|manage_members|delete_room>
{ "hasPermission": true, "role": "owner" }
POST /api/rooms/:roomId/clear — owner (removes all content, keeps the room)
DELETE /api/rooms/:roomId — owner (deletes the room entirely)