Service Accounts
Create Service Account
$client->beta->organization->serviceAccounts->create(string name, ?string description, ?OrganizationRole organizationRole, ?list<AnthropicBeta> betas): ServiceAccountRequires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.
List Service Accounts
$client->beta->organization->serviceAccounts->list(?bool includeArchived, ?int limit, ?string page, ?list<AnthropicBeta> betas): PageCursor<ServiceAccount>Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.
Get Service Account
$client->beta->organization->serviceAccounts->retrieve(string serviceAccountID, ?list<AnthropicBeta> betas): ServiceAccountRequires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.
Update Service Account
$client->beta->organization->serviceAccounts->update(string serviceAccountID, ?string description, ?OrganizationRole organizationRole, ?list<AnthropicBeta> betas): ServiceAccountRequires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.
Archive Service Account
$client->beta->organization->serviceAccounts->archive(string serviceAccountID, ?list<AnthropicBeta> betas): ServiceAccountRequires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.
Models
Service AccountsWorkspaces
Add Workspace To Service Account
$client->beta->organization->serviceAccounts->workspaces->add(string serviceAccountID, string workspaceID, NoBillingWorkspaceRole workspaceRole, ?list<AnthropicBeta> betas): ServiceAccountWorkspaceMemberRequires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.
List Workspaces For Service Account
$client->beta->organization->serviceAccounts->workspaces->list(string serviceAccountID, ?int limit, ?string page, ?list<AnthropicBeta> betas): PageCursor<ServiceAccountWorkspaceMember>Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.
Remove Workspace From Service Account
$client->beta->organization->serviceAccounts->workspaces->remove(string workspaceID, string serviceAccountID, ?list<AnthropicBeta> betas): WorkspaceRemoveResponseRequires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.