Claude Platform Docs

現在の組織を取得

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

認証されたAPIキーに関連付けられた組織に関する情報を取得します。

Returns
interface BetaOrganization { 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.

現在の組織を取得
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 betaOrganization = await client.beta.organization.retrieve();

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