Claude Platform Docs

Get Current Organization

client.Beta.Organization.Get(ctx) (*BetaOrganization, error)
GET/v1/organizations/me

Retrieve information about the organization associated with the authenticated API key.

Returns
type BetaOrganization struct{…}
ID string

ID of the Organization.

formatuuid
Name string

Name of the Organization.

Type Organization

Object type.

For Organizations, this is always "organization".

defaultorganization

Get Current Organization

package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go"
	"github.com/anthropics/anthropic-sdk-go/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	betaOrganization, err := client.Beta.Organization.Get(context.TODO())
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", betaOrganization.ID)
}
{
  "id": "12345678-1234-5678-1234-567812345678",
  "name": "Organization Name",
  "type": "organization"
}
Returns Examples
{
  "id": "12345678-1234-5678-1234-567812345678",
  "name": "Organization Name",
  "type": "organization"
}