Skip to main content
Unban Member
Sets a banned member’s status back to "active", in this space and in the child spaces where they are banned (a ban covers child spaces, and so does lifting it). A request that was pending or rejected in a child space before the ban stays as it was. Unbanning makes the person an active member of this space even if they were never approved, for example when their request was still pending at the time of the ban. The member gets each space’s chat back the next time they open it. Requires the caller to be a moderator or admin. Moderators can only unban regular members, not other moderators or admins. Only the space’s owner (its userId: the creator of a top-level space, the root space’s creator for a sub-space) can unban an admin, as only they can ban one.

Path Parameters

string
required
UUID of the space.
string
required
UUID of the banned user to unban. Your own id is refused (400 space/own-member-id): your own membership is /spaces/:spaceId/members/me.

Body Parameters

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

The unbanned membership record, as a SpaceMember object.
string
Membership id.
string
The space.
string
The member.
'admin' | 'moderator' | 'member'
The member’s role.
'pending' | 'active' | 'banned' | 'rejected'
Always active.
string
When the membership became active (ISO 8601).
string
When the membership record was created (ISO 8601).

Error Responses

Returned when spaceId or userId isn’t a valid UUID. Checked before sign-in, permissions and the endpoint’s other checks.
userId is the acting user (the token’s user, or the user named by actingUserId). This route acts on another member; check your own membership with GET /spaces/:spaceId/members/me and leave with DELETE /spaces/:spaceId/members/me.
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.
userId has no banned membership in this space.
The member is still banned in a parent of this space. Lift that ban first; bannedSpaceIds lists where.
A moderator unbanning someone who is a moderator or admin in this space or in one of the child spaces the unban covers.
Unbanning someone who is an admin in this space or in one of the child spaces the unban covers, by anyone but the space’s owner.
See also: useUnbanMember