Skip to main content

Overview

useModerateSpaceEntity returns a callable function for taking moderation action on an entity in a space. Requires the caller to be a moderator or admin. A draft can’t be moderated: it rejects with 404 moderation/entity-not-found, like a missing entity.

Usage Example

Parameters

string
required
UUID of the space containing the entity.
string
required
UUID of the entity to moderate.
"approve" | "remove"
required
The moderation action to take.

Returns

"approved" | "removed" | null
The entity’s status after the request. An entity its owner deleted takes no moderation change, so it answers with its existing status, which can be null.
For integration guidance, see Moderation.