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.
Create a room
Section titled “Create a room”POST /api/rooms/:roomIdAuthorization: Bearer <jwt>Content-Type: application/jsonThe 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 room metadata
Section titled “Get room metadata”GET /api/rooms/:roomIdAuthorization: Bearer <token> (optional for public rooms)Returns counts and, for authenticated members, userRole and hasAccess. Readable with a read token.
Get room info (map route)
Section titled “Get room info (map route)”GET /api/rooms/:roomId/infoMetadata 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.
Toggle public visibility
Section titled “Toggle public visibility”PATCH /api/rooms/:roomId/public # body: { "isPublic": true } — ownerPATCH /api/rooms/:roomId/presentation/public # body: { "isPublic": true } — owner or editorThe first makes the whole room publicly viewable; the second makes only the presentation deck public.
Presentation snapshot
Section titled “Presentation snapshot”GET /api/rooms/:roomId/presentationReturns a presentation-only snapshot (the objects referenced by saved slides). Public decks are readable without authentication even when the room is private.
Camera & entry defaults
Section titled “Camera & entry defaults”PATCH /api/rooms/:roomId/camera-settings — ownerContent-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.
Timeline settings
Section titled “Timeline settings”PATCH /api/rooms/:roomId/timeline-settings — ownerOptional fields: groupingMode (none/day/month/year), showMarkersOnly, showAdditionsOnly,
dateDisplayMode (event/creation), dateTimeFormat (dmy/mdy/iso), sliderMode
(past/current/future).
Check a permission
Section titled “Check a permission”GET /api/rooms/:roomId/permissions?action=<view|edit|delete|invite|manage_members|delete_room>{ "hasPermission": true, "role": "owner" }Clear or delete a room
Section titled “Clear or delete a room”POST /api/rooms/:roomId/clear — owner (removes all content, keeps the room)DELETE /api/rooms/:roomId — owner (deletes the room entirely)
