Skip to main content

Overview

useDeclineMember returns a callable function for declining a pending join request. Sets the membership status to "rejected". Requires the caller to be a moderator or admin.

Usage Example

Parameters

string
required
UUID of the space.
string
required
UUID of the user whose pending request to decline — 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 declined membership record (status: "rejected"), as a SpaceMember object: id, spaceId, userId, role, status, joinedAt and createdAt.