Skip to main content

Overview

useUnbanMember returns a callable function for unbanning a member. Sets their membership status from "banned" back to "active", in this space and in the child spaces where they are banned. Refused while the member is still banned in a parent space. Requires the caller to be a moderator or admin.

Usage Example

Parameters

string
required
UUID of the space.
string
required
UUID of the banned user to unban — their user id, not a membership id. Must be another member: your own id is refused (400 space/own-member-id). Your own membership is useCheckMyMembership / useLeaveSpace.

Returns

Resolves with the unbanned membership record (status: "active"), as a SpaceMember object: id, spaceId, userId, role, status, joinedAt and createdAt.