Skip to main content
Moderate Entity
Takes a direct moderation action on an entity in a space. Requires the caller to be a moderator or admin. Removing an entity that’s already removed succeeds and changes nothing: the first removal’s record (who, when, why) stays. An entity its owner deleted (with the project’s soft delete on) takes no moderation change at all, and the response carries its existing status.

Path Parameters

string
required
UUID of the space.
string
required
UUID of the entity to moderate.

Body Parameters

string
required
The moderation action: "approve" or "remove".
string
Optional reason for the moderation action. Up to 1,000 characters. Stored on the entity as moderationReason, which only moderators and the entity’s author can see (a service key sees it only when it acts as one of them) — see Moderation fields.
string
Required with a service key: the user this request acts as. The request has exactly that user’s permissions, so it is refused unless they are a moderator or admin of the space, and it is recorded as theirs. A user token always acts as its own user and must not send it (400 space/acting-user-not-allowed).

Response

string
The entity’s status after the request: "approved" or "removed", or the existing status (possibly null) of an entity its owner deleted.

Error Responses

Returned when spaceId or entityId isn’t a valid UUID. Checked before sign-in, permissions and the endpoint’s other checks.
A service key sent no actingUserId.
actingUserId is not a user id.
A user token sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
actingUserId was sent in the query string. On this endpoint every field, actingUserId included, goes in the request body.
Returned when a service key names an actingUserId that isn’t a user in this project.
The caller (or the user named by actingUserId) is not a moderator or admin of the space.
No published entity with this id is in this space: the id names nothing, names an entity in another space, or names a draft (a draft is its author’s private work, so moderators can’t act on it). All answer the same way.
The project doesn’t have the entities bundle. While it is still being installed, the response is 503 database/tables-provisioning instead. See Bundles.
See also: useModerateSpaceEntity