Skip to content
  • Auto
  • Light
  • Dark

Retrieve

Retrieve an organization by name
client.Orgs.Get(ctx, org) (*DisplayNamestringObjectOrgObjectSlugstringOrg, error)
get/v0/orgs/{org}

Retrieve an organization by name

Parameters
orgstring
Returns
DisplayNamestringObjectOrgObjectSlugstringOrg
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"),
  )
  org, err := client.Orgs.Get(context.TODO(), "org")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", org.DisplayName)
}
200 Example
{
  "display_name": "display_name",
  "object": "org",
  "slug": "slug"
}