Claude Platform Docs

Obter organização atual

beta.organization.retrieve() -> BetaOrganization
GET/v1/organizations/me

Recupere informações sobre a organização associada à chave de API autenticada.

Returns
class BetaOrganization: type: "organization"; id; name
type: Literal["organization"]

Object type.

For Organizations, this is always "organization".

defaultorganization
id: str

ID of the Organization.

formatuuid
name: str

Name of the Organization.

Obter organização atual
import os
from anthropic import Anthropic

client = Anthropic(
    api_key=os.environ.get(
        "ANTHROPIC_API_KEY"
    ),  # This is the default and can be omitted
)
beta_organization = client.beta.organization.retrieve()
print(beta_organization.id)
Returns Examples
Response 200
{
  "id": "12345678-1234-5678-1234-567812345678",
  "name": "Organization Name",
  "type": "organization"
}