Skip to Content
HomeLink Hub
Chat

Report a chat room

POST
/api/v1/chat/rooms/{roomId}/report

Access: Bearer token required.

Files a report against a conversation. A Report document is created with the caller as reporterId, the room as reportedRoomId and status Pending (the model's statuses are Pending, Reviewed, Resolved). Only participants of the room can report it (anyone else, and any unknown or deleted room id, gets a 403). The same user can report the same room repeatedly, and nothing is emitted, emailed or notified. No other code in the service reads the Report collection, so there is currently no API to list or resolve reports. reason must be one of the model's enum values; anything else fails Mongoose validation, which the error middleware returns as a 400 in the standard error envelope.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Access token returned by sign-in. Send it as Authorization: Bearer <token>.

Path Parameters

roomId*string

ObjectId of the chat room being reported.

Request Body

application/json
  1. body
reason*string

One of Spam, Harassment, Fraud, Inappropriate Content, Other (case-sensitive).

description?string

Free-text details, at most 1000 characters.

Response Body

Report stored. Note the body has message and data but no status.

application/json
  1. response
success*boolean
data*
message*string
Example Request
curl -X POST 'http://localhost:4000/api/v1/chat/rooms/string/report' \  -H 'Content-Type: application/json' \  -d '{  "reason": "Fraud",  "description": "Asked me to pay the caution fee to a personal account outside the app."}'
Example Response
{  "success": true,  "data": {    "_id": "6660a7d49b1d4a0012ab3560",    "reporterId": "665f1c2e9b1d4a0012ab34c4",    "reportedRoomId": "6660a7d49b1d4a0012ab3550",    "reason": "Fraud",    "description": "Asked me to pay the caution fee to a personal account outside the app.",    "status": "Pending",    "createdAt": "2026-06-05T14:02:10.107Z",    "updatedAt": "2026-06-05T14:02:10.107Z",    "__v": 0  },  "message": "Report submitted successfully"}