Claude Platform Docs

Obtener la organización actual

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

Recupera información sobre la organización asociada con la clave de API autenticada.

Returns
type OrganizationInfo struct { Type: "organization"; ID; Name }
Type Organization

Object type.

For Organizations, this is always "organization".

defaultorganization
ID string

ID of the Organization.

formatuuid
Name string

Name of the Organization.

Obtener la organización actual
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"),
	)
	organizationInfo, err := client.Organization.Get(context.TODO())
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", organizationInfo.ID)
}
Returns Examples
Response 200
{
  "id": "12345678-1234-5678-1234-567812345678",
  "name": "Organization Name",
  "type": "organization"
}