Skip to content
EN

Comments

Comments attach to a marker, layer, or drawing, with an optional geographic pin. REST mirrors the in-app operations.

Method Path Permission Body
GET /api/rooms/:roomId/comments read query: objectId?, objectType?, resolved?
POST /api/rooms/:roomId/comments write { objectId, objectType, body, objectName?, lat?, lng? }
POST /api/rooms/:roomId/comments/:commentId/replies write { body }
PATCH /api/rooms/:roomId/comments/:commentId write { resolved: boolean }
DELETE /api/rooms/:roomId/comments/:commentId write
DELETE /api/rooms/:roomId/comments/:commentId/replies/:replyId write

objectType is one of marker, layer, drawing. Example:

Terminal window
curl -X POST "$API/api/rooms/$ROOM/comments" -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"objectId":"marker-1","objectType":"marker","body":"needs review","lat":47.56,"lng":7.59}'

Validation (400): objectType must be one of the three; body non-empty and ≤5000 chars; objectName ≤500; lat/lng finite, in range, both-or-neither.

Delete rules: a room API token may delete only comments/replies it authored; a user session may delete any.