Skip to content
Ona Docs

ListJoinableOrganizations

client.accounts.listJoinableOrganizations(AccountListJoinableOrganizationsParams { token, pageSize, pagination } params, RequestOptionsoptions?): JoinableOrganizationsPage<JoinableOrganization { organizationId, organizationName, organizationMemberCount } >
POST/gitpod.v1.AccountService/ListJoinableOrganizations

Lists organizations that the currently authenticated account can join.

Use this method to:

  • Discover organizations associated with the account’s email domain.
  • Allow users to join existing organizations.
  • Display potential organizations during onboarding.

Examples

  • List joinable organizations:

    Retrieves a list of organizations the account can join.

    {}
ParametersExpand Collapse
params: AccountListJoinableOrganizationsParams { token, pageSize, pagination }
token?: string

Query param

pageSize?: number

Query param

maximum100
minimum0
ReturnsExpand Collapse
JoinableOrganization { organizationId, organizationName, organizationMemberCount }
organizationId: string

organization_id is the id of the organization the user can join

formatuuid
organizationName: string

organization_name is the name of the organization the user can join

organizationMemberCount?: number

organization_member_count is the member count of the organization the user can join

formatint32

ListJoinableOrganizations

import Gitpod from '@gitpod/sdk';

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

// Automatically fetches more pages as needed.
for await (const joinableOrganization of client.accounts.listJoinableOrganizations()) {
  console.log(joinableOrganization.organizationId);
}
{
  "pagination": {
    "nextToken": "nextToken"
  },
  "joinableOrganizations": [
    {
      "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "organizationName": "organizationName",
      "organizationMemberCount": 0
    }
  ]
}
Returns Examples
{
  "pagination": {
    "nextToken": "nextToken"
  },
  "joinableOrganizations": [
    {
      "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "organizationName": "organizationName",
      "organizationMemberCount": 0
    }
  ]
}