Remove Member
Remove a member from a workspace, or leave it yourself.
Removes a member from a workspace. Pass your own membership id to leave the workspace.
An admin or member can remove themselves (leave) while the workspace has other members. The owner can't leave, and neither can the only member. Removing someone else requires the admin or owner role — a member gets 403 forbidden with details.requiredRole: "admin". Requires a session JWT; API keys are rejected with 401. Any plan.
Rules that depend on who is being removed:
400). They are demoted first with Update Member Role or lose ownership in a transfer.403 owner_cannot_leave), even when the workspace has another owner. To step away, transfer ownership — you become an admin and can then leave — or delete the workspace or your account.409 sole_member). Delete the workspace or your account instead. Two members leaving at the same moment are handled one after the other, so a workspace is never left with nobody in it.Path Parameters
Response — 200 OK
lefttrue when you removed yourself. Recorded in the audit log as org.member.left; removing someone else is org.member.removed.Error Responses
400 Bad Request
bad_request ("Cannot remove the owner") — you tried to remove another member who is an owner.
401 Unauthorized
unauthorized for a missing, invalid or expired token (or an API key); session_revoked when the session has been signed out.
403 Forbidden
owner_cannot_leave — you are an owner and tried to leave:
forbidden — a member tried to remove someone else:
Without role details, the 403 means you don't belong to the workspace.
404 Not Found
not_found — the workspace doesn't exist or is deleted, or memberId is not a member of this workspace ("Member not found").
409 Conflict
sole_member — you are the only member and tried to leave: