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 | — |
Members only. Comments belong to the room’s members, public rooms included. Listing them needs a
room API token with read or the session of a member (owner, editor or viewer). Without credentials
the API answers 401; a signed-in user who is not a member gets 403.
objectType is one of marker, layer, drawing. Example:
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.