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.

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.
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
Confirmation message.
string
The resulting status: "approved" or "removed".

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.
See also: useModerateSpaceEntity