TrackMe API Docs
Flow guides

Reporting Content

Mobile review/community-post reporting, permanent duplicate handling, content snapshots, and the admin moderation actions.

The current mobile contract reports reviews and community posts through one authenticated endpoint:

POST /api/v1/reports HTTP/1.1
Authorization: Bearer oat_xxx
Content-Type: application/json

{
  "targetType": "review",
  "targetId": "rev_01jq...",
  "reason": "harassment",
  "note": "Targets another user by name."
}

The server verifies that the content exists and is still visible, rejects reporting your own content, freezes a content/author snapshot for moderators, and creates the report at status: "pending".

The duplicate contract is permanent for the same (reporter, targetType, targetId). A second mobile report returns 409 ALREADY_REPORTED, even after moderation closes the first report. Disable the report action after a successful submission or handle the 409 as “already sent.”

Mobile create contract

Request fields

FieldRules
targetTypeRequired: review or community_post.
targetIdRequired string, max 30 characters.
reasonRequired enum listed below.
noteOptional free text, max 500 characters.

Accepted reason values:

spam
harassment
hate_speech
inappropriate
scam
false_information
other

Success response — 201

{
  "data": {
    "id": "rpt_01jq...",
    "targetType": "review",
    "targetId": "rev_01jq...",
    "reason": "harassment",
    "status": "pending",
    "createdAt": "2026-07-13T12:00:00.000Z"
  },
  "meta": { "requestId": "req_01..." }
}

The mobile app only needs the 2xx result to show its confirmation. Filing a report does not immediately hide the content.

Expected errors

StatusCodeMeaning
401AUTH_REQUIREDMissing or invalid Bearer token.
403FORBIDDENThe caller authored the target content.
404NOT_FOUNDTarget missing, deleted, or no longer visible.
409ALREADY_REPORTEDCaller previously reported this target.
422VALIDATION_ERRORInvalid target/reason or note longer than 500 chars.
429RATE_LIMITEDMore than 20 report attempts in one hour.

What is snapshotted

For a review, moderation receives the review text, rating, original creation time, and author id/name. For a community post it receives the body, creation time, and author id/name. Later edits or deletion do not erase the evidence attached to the report.

The API rejects self-reports by comparing the authenticated user with the snapshotted author.

Legacy compatibility route

Older clients remain supported:

POST /api/v1/reviews/:reviewId/report

{ "reportType": "inappropriate", "description": "..." }

This wrapper retains the legacy nested response and legacy new | under_review | resolved | rejected lifecycle. Existing generic requests using reportType also remain accepted. New mobile work should use reason on POST /api/v1/reports and should parse the top-level data response shown above.

Admin moderation API

These routes require an authenticated admin role and are not part of the customer app.

Queue and grouping

GET /api/v1/admin/reports?status=pending&targetType=review&reason=harassment&group=target&limit=20&cursor=...

Supported filters are status, targetType, reason, priority, from, to, group=target, cursor, and limit. Each item includes:

  • reporter id/name;
  • target and author ids;
  • reason, note, status, resolution, and moderation metadata;
  • reportsCount for the same target;
  • the frozen content snapshot and author;
  • resolution/admin timestamps.

GET /api/v1/admin/reports/:id returns the selected report plus every report filed against the same target. GET /api/v1/admin/reports/summary returns { pending, reviewing, last7Days }.

Take action

PATCH /api/v1/admin/reports/:id
Content-Type: application/json

{ "action": "remove_content", "adminNote": "Community policy violation." }
ActionResult
remove_contentSoft-deletes/moderates the review or community post, resolves all reports for that target with content_removed, and recalculates truck review aggregates when needed.
dismissKeeps the content and dismisses this report with content_kept.
warn_userNotifies the content author and resolves related target reports with user_warned.
ban_userBans the author, revokes access/device tokens, and resolves related target reports with user_banned.

Every action records resolvedBy, resolvedAt, adminNote, and an audit-log entry. The legacy admin status body remains accepted for the existing web dashboard.

Mobile integration checklist

  • Send only review or community_post for the new contract.
  • Send the exact reason enum value; UI labels remain client-localized.
  • Keep note at or below 500 characters.
  • Treat 201 as queued, not removed.
  • Treat 409 ALREADY_REPORTED as a stable already-submitted state.
  • Do not build a “My reports” polling screen; there is no mobile list endpoint.

On this page