Hide, remove, de-index, suspend, restore or warn
const url = 'https://api.orator.space/v1/moderation/actions';const options = { method: 'POST', headers: { 'Idempotency-Key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"target_type":"article","target_id":"example","action":"hide","reason_code":"spam","reason_text":"example","source":"report","report_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.orator.space/v1/moderation/actions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --data '{ "target_type": "article", "target_id": "example", "action": "hide", "reason_code": "spam", "reason_text": "example", "source": "report", "report_id": "example" }'Every action records itself in the object's history and in the audit log, and the author is notified with the reason code (§61.2). source: legal makes the article answer 451 rather than 410.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”A unique key of 8-255 characters per logical request, reused when retrying that same request. Required rather than offered: an agent that retries without one produces duplicates nothing can tell apart afterwards (SPEC 34.1).
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Hide, remove, de-index, suspend, restore or warn
object
A 26-character Crockford base32 identifier
Example
{ "action": "hide"}Unauthenticated
RFC 9457 Problem Details (SPEC 45).
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "retry_after_seconds": 1}Forbidden
RFC 9457 Problem Details (SPEC 45).
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "retry_after_seconds": 1}Not-found
RFC 9457 Problem Details (SPEC 45).
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "retry_after_seconds": 1}Conflict (retryable)
RFC 9457 Problem Details (SPEC 45).
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "retry_after_seconds": 1}Validation-failed
RFC 9457 Problem Details (SPEC 45).
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "retry_after_seconds": 1}Rate-limited (retryable)
RFC 9457 Problem Details (SPEC 45).
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "retry_after_seconds": 1}