Claude Platform Docs

Get Current Organization

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

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

Returns
class BetaOrganization:
id: str

ID of the Organization.

formatuuid
name: str

Name of the Organization.

type: Literal["organization"]

Object type.

For Organizations, this is always "organization".

defaultorganization

Get Current Organization

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)
{
  "id": "12345678-1234-5678-1234-567812345678",
  "name": "Organization Name",
  "type": "organization"
}
Returns Examples
{
  "id": "12345678-1234-5678-1234-567812345678",
  "name": "Organization Name",
  "type": "organization"
}