Claude Platform Docs

Service Accounts

Create Service Account
BetaServiceAccount beta().organization().serviceAccounts().create(ServiceAccountCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/organizations/service_accounts
List Service Accounts
ServiceAccountListPage beta().organization().serviceAccounts().list(ServiceAccountListParamsparams = ServiceAccountListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/organizations/service_accounts
Get Service Account
BetaServiceAccount beta().organization().serviceAccounts().retrieve(ServiceAccountRetrieveParamsparams = ServiceAccountRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/organizations/service_accounts/{service_account_id}
Update Service Account
BetaServiceAccount beta().organization().serviceAccounts().update(ServiceAccountUpdateParamsparams = ServiceAccountUpdateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/organizations/service_accounts/{service_account_id}
Archive Service Account
BetaServiceAccount beta().organization().serviceAccounts().archive(ServiceAccountArchiveParamsparams = ServiceAccountArchiveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/organizations/service_accounts/{service_account_id}/archive
Models
class BetaServiceAccount:

Named non-human identity within the caller's organization.

A service account is a pure identity: name + org. Authorization lives on whatever references it (federation rules).

class BetaServiceAccountWorkspaceMember:
Optional<String> createdByActorId

Tagged ID (user_.../svac_...) of the actor who created this membership.

Optional<Boolean> implicit

True when this is the implicit default-workspace membership every service account has when no explicit membership exists. Implicit memberships have role workspace_user and cannot be removed.

String serviceAccountId

Tagged service account ID (svac_...).

JsonValue type "service_account_workspace_member"constant
String workspaceId

Tagged workspace ID (wrkspc_...).

BetaWorkspaceRole workspaceRole

Role of the service account in this workspace. Service accounts cannot hold the workspace_billing role.

One of the following:
WORKSPACE_ADMIN("workspace_admin")
WORKSPACE_BILLING("workspace_billing")
WORKSPACE_DEVELOPER("workspace_developer")
WORKSPACE_RESTRICTED_DEVELOPER("workspace_restricted_developer")
WORKSPACE_USER("workspace_user")

Service AccountsWorkspaces

Add Workspace To Service Account
BetaServiceAccountWorkspaceMember beta().organization().serviceAccounts().workspaces().add(WorkspaceAddParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/organizations/service_accounts/{service_account_id}/workspaces
List Workspaces For Service Account
WorkspaceListPage beta().organization().serviceAccounts().workspaces().list(WorkspaceListParamsparams = WorkspaceListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/organizations/service_accounts/{service_account_id}/workspaces
Remove Workspace From Service Account
WorkspaceRemoveResponse beta().organization().serviceAccounts().workspaces().remove(WorkspaceRemoveParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
DELETE/v1/organizations/service_accounts/{service_account_id}/workspaces/{workspace_id}