Skip to content
FeedbackDashboard

List organizations

OrgListResponse orgs().list(OrgListParamsparams = OrgListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v0/orgs

List organizations accessible to the current authentication method.

ParametersExpand Collapse
OrgListParams params
ReturnsExpand Collapse
class OrgListResponse:
List<Org> data
Optional<String> displayName
boolean enableAiCommitMessages
Object object_
String slug
boolean hasMore
Optional<String> nextCursor

List organizations

package com.stainless.api.example;

import com.stainless.api.client.StainlessClient;
import com.stainless.api.client.okhttp.StainlessOkHttpClient;
import com.stainless.api.models.orgs.OrgListParams;
import com.stainless.api.models.orgs.OrgListResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        StainlessClient client = StainlessOkHttpClient.fromEnv();

        OrgListResponse orgs = client.orgs().list();
    }
}
{
  "data": [
    {
      "display_name": "display_name",
      "enable_ai_commit_messages": true,
      "object": "org",
      "slug": "slug"
    }
  ],
  "has_more": true,
  "next_cursor": "next_cursor"
}
Returns Examples
{
  "data": [
    {
      "display_name": "display_name",
      "enable_ai_commit_messages": true,
      "object": "org",
      "slug": "slug"
    }
  ],
  "has_more": true,
  "next_cursor": "next_cursor"
}