/v1/workspaces/{workspace_id}/communities/{community_id}/moderation/actionsAuthApply a moderation action directly, without a preceding flag (task 017). Acts on any target — post/comment (status), direct_message (moderator soft-delete), or actor (ban=suspend / restore=reinstate). Writes a flag_id=null audit row.
Path parameters
workspace_id*string · uuidId of the workspace.
community_id*string · uuidId of the community.
Headers
Idempotency-KeystringOpaque client-generated string used to deduplicate retries within a 24h window. Replays return the original response; same key + different body returns 409 `IDEMPOTENCY_KEY_REUSE`.
Request body
target_kind*enum (4)What the action targets (task 017). post/comment → status transition; direct_message → moderator soft-delete; actor → ban=suspend / restore=reinstate.
Example: "direct_message"
target_id*string · uuidThe target UUID (post/comment/actor/message id per target_kind).
Example: "bbbbbbbb-0000-0000-0000-000000000001"
action*enum (7)Action. hide/remove act on the target; ban/restore suspend/reinstate an actor; warn is audit-only. The audit row has flag_id=null (unsolicited action).
Example: "remove"
notesstringOptional moderator notes (up to 2000 chars).
Response · 201 Action recorded (flag_id=null audit row); side-effect applied.
id*string · uuidAction UUID.
Example: "eeeeeeee-0000-0000-0000-000000000001"
community_id*string · uuidOwning community UUID.
Example: "cccccccc-cccc-cccc-cccc-cccccccccccc"
flag_id*string · uuidFlag UUID this action was applied to.
Example: "ffffffff-0000-0000-0000-000000000001"
target_kind*objectWhat the action targeted.
Example: "post"
target_id*string · uuidUUID of the post, comment, actor or message acted on. Null when that target has since been deleted — the record of a moderator's decision outlives the content it was about.
Example: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
moderator_account_id*string · uuidPlatformUser account UUID of the moderator.
Example: "99999999-0000-0000-0000-000000000001"
action*objectAction applied.
Example: "hide"
notes*stringOptional moderator notes.
Example: "Spam confirmed."
created_at*string · date-timeISO timestamp the action was recorded.
Example: "2026-05-01T12:00:00.000Z"
Example
Request
POST https://social.productcraft.co/v1/workspaces/{workspace_id}/communities/{community_id}/moderation/actions
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"target_kind": "direct_message",
"target_id": "bbbbbbbb-0000-0000-0000-000000000001",
"action": "remove",
"notes": "string"
}Response
{
"id": "eeeeeeee-0000-0000-0000-000000000001",
"community_id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
"flag_id": "ffffffff-0000-0000-0000-000000000001",
"target_kind": "post",
"target_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
"moderator_account_id": "99999999-0000-0000-0000-000000000001",
"action": "hide",
"notes": "Spam confirmed.",
"created_at": "2026-05-01T12:00:00.000Z"
}