Skip to content
FeedbackDashboard

List organizations

orgs.list() -> OrgListResponse
get/v0/orgs

List organizations accessible to the current authentication method.

ReturnsExpand Collapse
class OrgListResponse:
data: List[Org]
display_name: Optional[str]
object: Literal["org"]
slug: str
has_more: bool
next_cursor: Optional[str]
List organizations
import os
from stainless_v0 import Stainless

client = Stainless(
    api_key=os.environ.get("STAINLESS_API_KEY"),  # This is the default and can be omitted
)
orgs = client.orgs.list()
print(orgs.data)
{
  "data": [
    {
      "display_name": "display_name",
      "object": "org",
      "slug": "slug"
    }
  ],
  "has_more": true,
  "next_cursor": "next_cursor"
}
Returns Examples
{
  "data": [
    {
      "display_name": "display_name",
      "object": "org",
      "slug": "slug"
    }
  ],
  "has_more": true,
  "next_cursor": "next_cursor"
}