Skip to content

Reporting System API documentation

Bavith babu edited this page May 6, 2026 · 2 revisions

Welcome to the Artifact-Registory-Backend wiki!

Reporting APIs

Reporting API Base URL

Production:

https://inscriptions.cdacb.in/api

All reporting APIs require Authorization: Bearer .

Base production endpoints:

POST /report

GET /reports

POST /moderate/{id}

1. Create Report

POST /report

URL: _ https://inscriptions.cdacb.in/api/report_

Purpose: Allows a user to report a POST, COMMENT, or USER for moderation review.

Access:

user

admin

Request body:

{

"targetType": "POST",

"targetId": "6817a9d9f2b7b12c34d56789",

"reason": "SPAM",

"details": "This post is repeatedly promoting unrelated links."

}

Request fields:

  • targetType: required, enum

    • POST
    • COMMENT
    • USER
  • targetId: required, target object id1.

  • reason: required, enum

    • SPAM
    • HATE_SPEECH
    • MISINFORMATION
    • HARASSMENT
    • EXPLICIT_CONTENT
    • OTHER
  • details: required, max length 1000

2. Get Reports

GET /reports

https://inscriptions.cdacb.in/api/report

Purpose: Fetches moderation reports for moderators/admins. Can return all reports or filter by status.

Access:

  • human_moderator(Admin)
  • ai_moderator

Query parameters:

  • status: optional

    • PENDING
    • AI_SCREENING
    • ESCALATED
    • RESOLVED

Example request:

GET /reports?status=ESCALATED

Authorization: Bearer <jwt-token>

3. Moderate Report

POST /moderate/{id}

URL:

https://inscriptions.cdacb.in/api/moderate/{reportId}

Purpose: Used to process an existing report. This endpoint supports both:

AI moderation flow for newly created reports Human moderator final decision for escalated reports

Access:

  • human_moderator(admin)
  • ai_moderator

Path parameters:

  • id: required, moderation report id

Behavior Based On Report Status Case 1: Report status = PENDING Use this endpoint to start moderation processing.

Body:

optional What happens:

report moves to AI_SCREENING

if AI is confident, report may be directly RESOLVED

if AI is unsure, report becomes ESCALATED

POST /moderate/{reportId}

Authorization: Bearer <jwt-token>

Case 2:

Report status = ESCALATED

Use this endpoint when a human moderator is reviewing the report.

Request body:

This body is optional, but is required when resolving an escalated report manually.

Example request body:

{

"action": "REMOVE_CONTENT", "note": "Confirmed policy violation."

}

Allowed moderation actions,This is only done by the admin:

  • WARN
  • REMOVE_CONTENT
  • BAN_REPORTER
  • BAN_AUTHOR
  • DISMISS

Notes: For ESCALATED reports, a valid action is required. note is optional and has max length 1000.

Example request:

POST /moderate/6817b0f5f2b7b12c34d56790

Authorization: Bearer

Content-Type: application/json

{

"action": "DISMISS", "note": "Reviewed by moderator, no violation found."

}

Clone this wiki locally