## LeaveOrganization `organizations.leave(OrganizationLeaveParams**kwargs) -> object` **post** `/gitpod.v1.OrganizationService/LeaveOrganization` Removes a user from an organization while preserving organization data. Use this method to: - Remove yourself from an organization - Clean up inactive memberships - Transfer project ownership before leaving - Manage team transitions ### Examples - Leave organization: Removes user from organization membership. ```yaml userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" ``` Note: Ensure all projects and resources are transferred before leaving. ### Parameters - `user_id: str` ### Returns - `object` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) response = client.organizations.leave( user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) print(response) ``` #### Response ```json {} ```