Leave Unit
DELETE
/units/{unitId}/membership
Allows the authenticated user to remove themselves from a Unit (opt-out). No special permissions required — a user can always leave a Unit they are assigned to. If this was their last Unit in the Space, the Space disappears from their dashboard.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” unitId
required
string
Header Parameters
Section titled “Header Parameters ” X-Space-Id
required
string format: uuid
UUID of the target Space (tenant boundary). Validated against user access.
Responses
Section titled “ Responses ”Unauthorized — missing or invalid JWT
Forbidden — insufficient permissions
Resource not found