Skip to main content
Remove Member
Removes a member from a workspace. Requires the remove-member capability and is rank-bounded (act only on strictly-lower ranks). Fires workspace.member.removed.
The owner is not a member, so removal targets members only. Sole-owner protection: the owner cannot be removed while sole owner — they must transfer ownership first.

Path Parameters

string
required
The workspace UUID.
string
required
The member to remove. Must not be the acting user (400 workspace/own-member-id).

Query Parameters

string
required
Service keys only — the acting user (the path :userId is the target). Required for a key: a key that names nobody is refused with 400 workspace/missing-user-id. The remove-member capability and the rank bound are enforced against the named user — act as the owner for an unrestricted removal.A user token always acts as its own user and must not send it (400 workspace/acting-user-not-allowed). See Acting on behalf of a user.

Response

204 No Content on success.

Error Responses

userId is the acting user (the token’s user, or the user named by actingUserId). This route acts on another member. Your own membership is GET /workspaces/:workspaceId/members/me to read it, PATCH /workspaces/:workspaceId/members/me to edit your title, and DELETE /workspaces/:workspaceId/members/me to leave.
A service key called this route without naming an actingUserId. Removal is rank-bounded against the remover’s own standing, so it must be performed as somebody — act as the owner for an unrestricted removal.
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.
A DELETE takes every field, actingUserId included, in the query string, so any request body is refused: a JSON object with keys, a non-empty array, or a non-JSON payload such as multipart (then params is omitted). An absent body and {} pass.
Returned when a service key names an actingUserId that isn’t a user in this project.
The acting user can see the workspace but has no remove-member capability on it.
The workspace doesn’t exist, or the acting user has no relation to it (not its owner, an ancestor owner, a member or a reach-holder): the two answer alike, with the same body Fetch Workspace gives. Also returned when the workspace is deleted while this request is being handled:
The target user isn’t a direct member of the workspace:
Every path id on the workspaces bundle is checked for UUID shape before the route runs, so a malformed one is a plain 400 rather than a 500 from the database.