Reports And Moderation API
Create A Report
curl -H 'content-type: application/json' \
-d '{"kind":"file","id":"abc123","reason":"abuse","details":"details"}' \
http://127.0.0.1:8080/api/v1/reports
Authenticated report:
curl -H 'authorization: Bearer mdd_TOKEN' \
-H 'content-type: application/json' \
-d '{"kind":"paste","id":"abc123","reason":"spam"}' \
http://127.0.0.1:8080/api/v1/reports
Required scope for authenticated callers:
reports:write
Response:
{
"reported": true
}
List Reports
curl -H 'authorization: Bearer mdd_TOKEN' \
'http://127.0.0.1:8080/api/v1/admin/reports?state=open&kind=file&days=7'
Required scope and role:
admin:reports
moderator or higher
Update A Report
curl -X PATCH \
-H 'authorization: Bearer mdd_TOKEN' \
-H 'content-type: application/json' \
-d '{"action":"resolve","note":"handled"}' \
http://127.0.0.1:8080/api/v1/admin/reports/REPORT_ID
The JSON body matches the admin report action form fields: action and optional note.
Update An Item
curl -X PATCH \
-H 'authorization: Bearer mdd_TOKEN' \
-H 'content-type: application/json' \
-d '{"state":"takedown","visibility":"unlisted","note":"confirmed","block_hash":true}' \
http://127.0.0.1:8080/api/v1/admin/items/file/abc123
Required scope and role:
admin:items
moderator or higher
Valid item states:
active
quarantined
takedown
legal_hold
deleted
deleted is terminal for files. Once a file is deleted or expired, its blob reference may be
released and the object removed, so it cannot be changed back to a live moderation state.
block_hash only works for files.
Admin Search
curl -H 'authorization: Bearer mdd_TOKEN' \
'http://127.0.0.1:8080/api/v1/admin/search?q=example&paste_content=true'
Required scope and role:
admin:search
moderator or higher