POST
Warn user (from report)

Overview

Issues a formal warning to the user the report names as the accused. Transitions the report from OPEN → WARNED and stamps resolvedBy, resolvedAt, resolutionReason = reason. The warning is delivered out-of-band via:
  1. A critical-kind push notification — per push notification fan-out, the critical kind bypasses notificationsMuted because a moderation action is a safety signal the user must see (QUESTIONS.md §7.4).
  2. A warning email to the accused’s primary email, in parallel with the push.
Idempotent: re-warning a WARNED report returns the row without re-firing either side-effect. Side-effect failures (FCM down, mail provider down) are logged and swallowed — they never roll back the DB transition (matches the Phase 5/6 push/notification producer policy). See Admin reports feed.

Authentication

Bearer <accessToken> with scope: 'admin' required.
Role-gated: SUPER or MODERATOR. FINANCE admins are read-only on the reports surface.

Path parameters

Query parameters

None.

Request body

Example payload

Response — 200 OK

Returns the full updated report row.

Error responses

Example error — 400 VALIDATION_FAILED

Side effects

Push and email are best-effort — if either fails the failure is logged and the warning still counts (the DB row is WARNED). The accused user is not silently let off the hook by a flaky FCM token or email provider.

See also

curl

Postman

See docs/postman/swappr.postman_collection.json → Admin Reports → Warn.