Skip to content
  • Auto
  • Light
  • Dark

List

List organizations the user has access to
client.Orgs.List(ctx) (*DataarrayHasMoreboolNextCursorstringOrgListResponse, error)
get/v0/orgs

List organizations the user has access to

Returns
OrgListResponsestruct
Hide ParametersShow Parameters
Dataarray
[]DisplayNamestringObjectOrgObjectSlugstringOrg
Hide ParametersShow Parameters
DisplayNamestring
ObjectOrgObjectOrgOrgObjectOrgObject
Hide ParametersShow Parameters
OrgObjectOrgconst
OrgObjectOrgOrgObjectOrgObject
"org"
Slugstring
HasMorebool
NextCursorstring
optional
package main

import (
  "context"
  "fmt"

  "github.com/stainless-api/stainless-api-go"
  "github.com/stainless-api/stainless-api-go/option"
)

func main() {
  client := stainless.NewClient(
    option.WithAPIKey("My API Key"),
  )
  orgs, err := client.Orgs.List(context.TODO())
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", orgs.Data)
}
200 Example
{
  "data": [
    {
      "display_name": "display_name",
      "object": "org",
      "slug": "slug"
    }
  ],
  "has_more": true,
  "next_cursor": "next_cursor"
}