POST
Report a user

Overview

Records a reports row for the moderation queue. A report points at an accusedUserId and optionally at a conversationId and messageId to scope the evidence. Reports are append-only from the API; admin actions (dismiss / warn / ban) land in Phase 6. When conversationId is supplied and the caller is a participant, the service snapshots the last 200 messages of that conversation into the report’s transcriptSnapshot field. This makes the report self-contained — admins can review what was actually said without re-permissioning into private chats. The 200-message cap exists so a malicious actor cannot bloat the report row by spamming first. Reporting is independent of blocking: the client may also call block-user, but neither is implied by the other.

Authentication

Bearer <accessToken> required. requireOnboarded middleware applied.

Path parameters

None.

Query parameters

None.

Request body

Reason enum

Example payload

Response — 201 Created

Report object

The transcriptSnapshot field is not returned to the caller — it’s admin-only.

Example response

Error responses

Example error — 400 (OTHER without freeText)

Side effects

  • One reports row inserted with status: "OPEN" and the optional transcriptSnapshot.
  • No notifications fire to the accused — reporting is silent by design.
  • Reporting does NOT block the accused. Call block-user separately if the caller wants to sever contact.

See also

curl