Moderation
Moderation queue, rule definitions, and per-user trust levels.
Moderation covers three surfaces: a queue of reported items (approve / reject / escalate), rule definitions (rule-driven filtering), and per-user trust levels (auto-approve bypasses the queue for trusted users).
Source: apps/api/src/routes/admin/moderation.ts.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /admin/projects/:projectId/moderation/queue | Paginated queue; defaults to ?status=pending. |
| POST | /admin/projects/:projectId/moderation/queue/:itemId/approve | Approve. |
| POST | /admin/projects/:projectId/moderation/queue/:itemId/reject | Reject. |
| POST | /admin/projects/:projectId/moderation/queue/:itemId/escalate | Escalate. |
| POST | /admin/projects/:projectId/moderation/rules | Create a rule. |
| GET | /admin/projects/:projectId/moderation/rules | List rules. |
| PATCH | /admin/projects/:projectId/moderation/rules/:ruleId | Partial update. |
| DELETE | /admin/projects/:projectId/moderation/rules/:ruleId | Delete a rule. |
| POST | /admin/projects/:projectId/moderation/trust | Upsert a user's trust level. |
| GET | /admin/projects/:projectId/moderation/trust | Paginated trust levels. |
GET /admin/projects/:projectId/moderation/queue
Query
| Param | Default | Values |
|---|---|---|
status | pending | pending, approved, rejected, escalated |
limit | 50 | |
offset | 0 |
Response 200
Try it:
GET
developer auth/admin/projects/%7B%7BprojectId%7D%7D/moderation/queuecurl -X GET 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/moderation/queue'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
POST /admin/projects/:projectId/moderation/queue/:itemId/approve
Marks status = 'approved', moderator_id = 'admin', resolved_at = NOW().
Errors
404 NOT_FOUND.
Try it:
POST
developer auth/admin/projects/%7B%7BprojectId%7D%7D/moderation/queue/%7B%7BitemId%7D%7D/approvecurl -X POST 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/moderation/queue/%7B%7BitemId%7D%7D/approve'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
POST /admin/projects/:projectId/moderation/queue/:itemId/reject
Same shape as approve; sets status = 'rejected'.
Try it:
POST
developer auth/admin/projects/%7B%7BprojectId%7D%7D/moderation/queue/%7B%7BitemId%7D%7D/rejectcurl -X POST 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/moderation/queue/%7B%7BitemId%7D%7D/reject'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
POST /admin/projects/:projectId/moderation/queue/:itemId/escalate
Sets status = 'escalated'. Does not stamp resolved_at.
Try it:
POST
developer auth/admin/projects/%7B%7BprojectId%7D%7D/moderation/queue/%7B%7BitemId%7D%7D/escalatecurl -X POST 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/moderation/queue/%7B%7BitemId%7D%7D/escalate'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
POST /admin/projects/:projectId/moderation/rules
Request (CreateModerationRuleInput)
| Field | Type | Required | Default |
|---|---|---|---|
name | string | yes | — |
rule_type | string | yes | — |
config | object | yes | — |
is_active | boolean | no | true |
Response 201
Try it:
POST
developer auth/admin/projects/%7B%7BprojectId%7D%7D/moderation/rulescurl -X POST 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/moderation/rules'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
GET /admin/projects/:projectId/moderation/rules
Try it:
GET
developer auth/admin/projects/%7B%7BprojectId%7D%7D/moderation/rulescurl -X GET 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/moderation/rules'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
PATCH /admin/projects/:projectId/moderation/rules/:ruleId
Allowed fields: name, rule_type, config, is_active.
Try it:
PATCH
developer auth/admin/projects/%7B%7BprojectId%7D%7D/moderation/rules/%7B%7BruleId%7D%7Dcurl -X PATCH 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/moderation/rules/%7B%7BruleId%7D%7D'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
DELETE /admin/projects/:projectId/moderation/rules/:ruleId
Try it:
DELETE
developer auth/admin/projects/%7B%7BprojectId%7D%7D/moderation/rules/%7B%7BruleId%7D%7Dcurl -X DELETE 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/moderation/rules/%7B%7BruleId%7D%7D'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
POST /admin/projects/:projectId/moderation/trust
Upsert by app_user_id.
Request (SetTrustLevelInput)
| Field | Type | Required | Default |
|---|---|---|---|
app_user_id | uuid | yes | — |
trust_level | string | yes | — |
auto_approve | boolean | no | false |
Response 200
Errors
500 UPSERT_FAILED.
Try it:
POST
developer auth/admin/projects/%7B%7BprojectId%7D%7D/moderation/trustcurl -X POST 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/moderation/trust'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
GET /admin/projects/:projectId/moderation/trust
Try it:
GET
developer auth/admin/projects/%7B%7BprojectId%7D%7D/moderation/trustcurl -X GET 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/moderation/trust'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl: