Claude Platform Docs

Aktuelle Organisation abrufen

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

Ruft Informationen über die Organisation ab, die mit dem authentifizierten API-Key verknüpft ist.

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.

Aktuelle Organisation abrufen
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"
}