Claude Platform Docs

Obtener la organización actual

client.organization.retrieve(options?): OrganizationInfo
GET/v1/organizations/me

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

Returns
interface OrganizationInfo { 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
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env["ANTHROPIC_API_KEY"] // This is the default and can be omitted
});

const organizationInfo = await client.organization.retrieve();

console.log(organizationInfo.id);
Returns Examples
Response 200
{
  "id": "12345678-1234-5678-1234-567812345678",
  "name": "Organization Name",
  "type": "organization"
}