foliot docs

API reference / Workspaces / Remove a member from a workspace

Remove a member from a workspace

DELETE/workspaces/{workspaceId}/members/{userId}

Authenticate with an operator token or a signed-in Foliot Console session.

Ends the person’s access to the workspace and its apps on their very next request. Their account, and any other workspace they belong to, is untouched. An owner of the workspace, or an operator token. 404 if the person is not a member of this workspace. 409 if they are the workspace’s only owner, whoever asks: make someone else an owner first. An owner may remove themselves once another owner exists. The caller’s own role is read again at the moment of the change, so an owner who was demoted or removed a moment earlier is refused (403 or 404) and removes nobody. Their Clerk account is untouched and they can still sign in; they see no workspace they are not in. To let them back an owner invites them again.

Path parameters

workspaceId
string (uuid)
REQUIRED

The workspace.

userId
string (uuid)
REQUIRED

Foliot's id for the member (userId in the member list), not their Clerk id.

Responses

204 no body No Content
400 Error Invalid request.
401 Error Missing, malformed or unknown bearer token.
403 Error The token is valid but not permitted on this route.
404 Error No such resource.
409 Error Conflicts with existing state.
503 Error A dependency this route needs is unreachable.