Claude Platform Docs

Service Accounts

List Service Account Workspace Members
client.Organization.Workspaces.ServiceAccounts.List(ctx, workspaceID, query) (*PageCursor[ServiceAccountWorkspaceMember], error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts

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.

Create Service Account Workspace Member
client.Organization.Workspaces.ServiceAccounts.Add(ctx, workspaceID, body) (*ServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts

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 Workspace Member
client.Organization.Workspaces.ServiceAccounts.Get(ctx, serviceAccountID, query) (*ServiceAccountWorkspaceMember, error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

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.

Update Service Account Workspace Member
client.Organization.Workspaces.ServiceAccounts.Update(ctx, serviceAccountID, params) (*ServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

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.

Delete Service Account Workspace Member
client.Organization.Workspaces.ServiceAccounts.Remove(ctx, serviceAccountID, body) (*OrganizationWorkspaceServiceAccountRemoveResponse, error)
DELETE/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

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.