Skip to content
Ona Docs

LeaveOrganization

client.organizations.leave(OrganizationLeaveParams { userId } body, RequestOptionsoptions?): OrganizationLeaveResponse
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.

    userId: "f53d2330-3795-4c5d-a1f3-453121af9c60"

Note: Ensure all projects and resources are transferred before leaving.

ParametersExpand Collapse
body: OrganizationLeaveParams { userId }
userId: string
formatuuid
ReturnsExpand Collapse
OrganizationLeaveResponse = unknown

LeaveOrganization

import Gitpod from '@gitpod/sdk';

const client = new Gitpod({
  bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});

const response = await client.organizations.leave({
  userId: 'f53d2330-3795-4c5d-a1f3-453121af9c60',
});

console.log(response);
{}
Returns Examples
{}