Get Current Organization
client.beta.organization.retrieve(RequestOptionsoptions?): BetaOrganizationGET/v1/organizations/me
Retrieve information about the organization associated with the authenticated API key.
Returns
Get Current 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);{
"id": "12345678-1234-5678-1234-567812345678",
"name": "Organization Name",
"type": "organization"
}Returns Examples
{
"id": "12345678-1234-5678-1234-567812345678",
"name": "Organization Name",
"type": "organization"
}