Skip to content
FeedbackDashboard

List organizations

orgs.list() -> OrgListResponse { data, has_more, next_cursor }
GET/v0/orgs

List organizations accessible to the current authentication method.

ReturnsExpand Collapse
class OrgListResponse { data, has_more, next_cursor }
data: Array[Org { display_name, enable_ai_commit_messages, object, slug } ]
display_name: String
enable_ai_commit_messages: bool
object: :org
slug: String
has_more: bool
next_cursor: String

List organizations

require "stainless_v0"

stainless = StainlessV0::Client.new(
  api_key: "My API Key",
  environment: "staging" # defaults to "production"
)

orgs = stainless.orgs.list

puts(orgs)
{
  "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"
}