Skip to main content
Ban Member
Sets a member’s status to "banned", in this space and the child spaces where they are an active member (a pending or rejected request in a child space is left as it is), and ends their membership of those spaces’ chats, so they can no longer post to or receive them (they keep read access to messages from before the ban). A request to join that is still pending can be banned too. Requires the caller to be a moderator or admin. Moderators can only ban regular members. Only the space creator can ban admins, and the last admin cannot be banned.

Path Parameters

string
required
UUID of the space.
string
required
UUID of the membership record to ban.

Body

string
Optional reason for the ban, kept with who banned them in the space’s ban log.

Response

string
Confirmation message.
object
The updated membership record with status: "banned".

Error Responses

The member is already banned here. The ban is still re-applied to their active memberships in child spaces, under the same rules as a first ban, so a repeated ban can instead return one of the errors below.
A moderator banning someone who is a moderator or admin in this space or in a child space the ban reaches. spaceId names that space.
Someone other than the space creator banning a member who is an admin in this space or in a child space the ban reaches. spaceId names that space.
The member is the last admin of this space or of a child space the ban reaches. spaceId names that space.
See also: useBanMember, Unban Member