beta · guide · 0.1.0
Submit and retrieve Comment reports
The Project Backend verifies the reporter's current Project Membership, resource visibility, and reporting policy before every request. MiniCenter accepts only spam, harassment, hate, violence, or sexual_content; reports contain no free text. Request reports:write to submit and reports:read to retrieve status.
: "${MINICENTER_URL:?set the Sandbox URL}"
: "${MINICENTER_PROJECT_CREDENTIAL:?set a Project Credential}"
: "${MINICENTER_COMMENT_ID:?set a Comment ID}"
curl --fail-with-body -X POST "${MINICENTER_URL}/api/v1/community/comments/${MINICENTER_COMMENT_ID}/reports" \
-H "Authorization: Bearer ${MINICENTER_PROJECT_CREDENTIAL}" \
-H 'Content-Type: application/json' \
--data '{"platform_account_id":"30000000-0000-4000-8000-000000000003","resource_type":"article","resource_id":"article-42","reason":"spam","idempotency_key":"article-42-report-1"}'
A first submission returns 201 with status received; an identical Project Client-scoped replay returns 200. Reusing the key with changed input returns 422. One Platform Account can submit only one report per Comment. The credential, Comment, and exact resource tuple must share one Project Client, and the reporter must be active.
: "${MINICENTER_REPORT_ID:?set the returned report ID}"
curl --get --fail-with-body "${MINICENTER_URL}/api/v1/community/comments/${MINICENTER_COMMENT_ID}/reports/${MINICENTER_REPORT_ID}" \
-H "Authorization: Bearer ${MINICENTER_PROJECT_CREDENTIAL}" \
--data-urlencode 'resource_type=article' \
--data-urlencode 'resource_id=article-42'
The response contains the report ID, Comment ID, reason, received or resolved status, nullable decision and decision time, and creation time. It never returns the reporter's Platform Account ID or free-text evidence. Resolve it with the separate moderation:write contract. If MiniCenter is unavailable, keep the resource usable and retry only with the original idempotency key.