Claude Platform Docs

Workspace

Daftar Workspace
client.Beta.Organization.Workspaces.List(ctx, params) (*Page[BetaWorkspace], error)
GET/v1/organizations/workspaces
Buat Workspace
client.Beta.Organization.Workspaces.New(ctx, params) (*BetaWorkspace, error)
POST/v1/organizations/workspaces
Dapatkan Workspace
client.Beta.Organization.Workspaces.Get(ctx, workspaceID, query) (*BetaWorkspace, error)
GET/v1/organizations/workspaces/{workspace_id}
Perbarui Workspace
client.Beta.Organization.Workspaces.Update(ctx, workspaceID, params) (*BetaWorkspace, error)
POST/v1/organizations/workspaces/{workspace_id}
Arsipkan Workspace
client.Beta.Organization.Workspaces.Archive(ctx, workspaceID, body) (*BetaWorkspace, error)
POST/v1/organizations/workspaces/{workspace_id}/archive
Models
type BetaAllowedInferenceGeo string
One of the following:
const BetaAllowedInferenceGeoGlobal BetaAllowedInferenceGeo = "global"
const BetaAllowedInferenceGeoUs BetaAllowedInferenceGeo = "us"
type BetaAnthropicHumanReview struct { Type }

The Workspace's human review setting.

Type BetaAnthropicHumanReviewType
One of the following:
const BetaAnthropicHumanReviewTypeDisabled BetaAnthropicHumanReviewType = "disabled"
const BetaAnthropicHumanReviewTypeEnabled BetaAnthropicHumanReviewType = "enabled"
type BetaAnthropicHumanReviewParam struct { Type }

Whether Anthropic's human review applies to the Workspace's inference data.

Type BetaAnthropicHumanReviewParamType
One of the following:
const BetaAnthropicHumanReviewParamTypeDisabled BetaAnthropicHumanReviewParamType = "disabled"
const BetaAnthropicHumanReviewParamTypeEnabled BetaAnthropicHumanReviewParamType = "enabled"
type BetaDataResidency struct { AllowedInferenceGeos; DefaultInferenceGeo; WorkspaceGeo }
AllowedInferenceGeos BetaDataResidencyAllowedInferenceGeosUnion

Permitted inference geo values. 'unrestricted' means all geos are allowed.

One of the following:
One of the following:
const BetaAllowedInferenceGeoGlobal BetaAllowedInferenceGeo = "global"
const BetaAllowedInferenceGeoUs BetaAllowedInferenceGeo = "us"
Unrestricted
DefaultInferenceGeo BetaDataResidencyDefaultInferenceGeo

Default inference geo applied when requests omit the parameter.

One of the following:
const BetaDataResidencyDefaultInferenceGeoGlobal BetaDataResidencyDefaultInferenceGeo = "global"
const BetaDataResidencyDefaultInferenceGeoUs BetaDataResidencyDefaultInferenceGeo = "us"
WorkspaceGeo BetaDataResidencyWorkspaceGeo

Geographic region for workspace data storage. Immutable after creation.

type BetaDataResidencyCreateConfigParam struct { AllowedInferenceGeos; DefaultInferenceGeo; WorkspaceGeo }
AllowedInferenceGeos BetaDataResidencyCreateConfigAllowedInferenceGeosUnionParam Optional

Permitted inference geo values. Defaults to 'unrestricted' if omitted, which allows all geos. Use the string 'unrestricted' to allow all geos, or a list of specific geos.

One of the following:
One of the following:
const BetaAllowedInferenceGeoGlobal BetaAllowedInferenceGeo = "global"
const BetaAllowedInferenceGeoUs BetaAllowedInferenceGeo = "us"
Unrestricted
DefaultInferenceGeo BetaDataResidencyCreateConfigDefaultInferenceGeo Optional

Default inference geo applied when requests omit the parameter. Defaults to 'global' if omitted. Must be a member of allowed_inference_geos unless allowed_inference_geos is "unrestricted".

One of the following:
const BetaDataResidencyCreateConfigDefaultInferenceGeoGlobal BetaDataResidencyCreateConfigDefaultInferenceGeo = "global"
const BetaDataResidencyCreateConfigDefaultInferenceGeoUs BetaDataResidencyCreateConfigDefaultInferenceGeo = "us"
WorkspaceGeo BetaDataResidencyCreateConfigWorkspaceGeo Optional

Geographic region for workspace data storage. Immutable after creation. Defaults to 'us' if omitted.

type BetaDataResidencyUpdateConfigParam struct { AllowedInferenceGeos; DefaultInferenceGeo }
AllowedInferenceGeos BetaDataResidencyUpdateConfigAllowedInferenceGeosUnionParam Optional

Permitted inference geo values. Use 'unrestricted' to allow all geos, or a list of specific geos.

One of the following:
One of the following:
const BetaAllowedInferenceGeoGlobal BetaAllowedInferenceGeo = "global"
const BetaAllowedInferenceGeoUs BetaAllowedInferenceGeo = "us"
Unrestricted
DefaultInferenceGeo BetaDataResidencyUpdateConfigDefaultInferenceGeo Optional

Default inference geo applied when requests omit the parameter. Must be a member of allowed_inference_geos unless allowed_inference_geos is "unrestricted".

One of the following:
const BetaDataResidencyUpdateConfigDefaultInferenceGeoGlobal BetaDataResidencyUpdateConfigDefaultInferenceGeo = "global"
const BetaDataResidencyUpdateConfigDefaultInferenceGeoUs BetaDataResidencyUpdateConfigDefaultInferenceGeo = "us"
type BetaExternalStorageMember struct { Type: "external"; ExternalStorageID }

The organization's External Storage that external_storage_id names.

Type External
defaultexternal
ExternalStorageID string

The External Storage ID, which starts with estrg_. Through Claude Platform on AWS, storage whose provider_config.type is aws has its bucket ARN as its ID instead: arn:<partition>:s3:::<bucket_name>, where <partition> is the partition of the bucket's region.

type BetaExternalStorageMemberParam struct { Type: "external"; ExternalStorageID }

The organization's External Storage that external_storage_id names.

Type External
ExternalStorageID string

The External Storage ID, which starts with estrg_. Through Claude Platform on AWS, storage whose provider_config.type is aws has its bucket ARN as its ID instead: arn:<partition>:s3:::<bucket_name>, where <partition> is the partition of the bucket's region.

type BetaHumanReviewOnWithExternalStorageErrorDetails struct { ErrorCode }
ErrorCode BetaHumanReviewOnWithExternalStorageErrorCode
type BetaInferenceDataPrivacy struct { HumanReview; SafeguardsStorage; TranscriptsStorage }
type BetaInferenceDataPrivacyCreateParam struct { HumanReview; SafeguardsStorage; TranscriptsStorage }

Where the Workspace's retained inference data and transcript copies go, and whether Anthropic's human review applies. A member cannot be null; omit it instead.

type BetaInferenceDataPrivacyUpdateParam struct { HumanReview; SafeguardsStorage; TranscriptsStorage }

Changes to where the Workspace's retained inference data and transcript copies go, and to whether Anthropic's human review applies. An omitted member is unchanged; a member cannot be null.

type BetaInternalStorage struct { Type: "internal" }

No External Storage for this purpose.

Type Internal
defaultinternal
type BetaInternalStorageParam struct { Type: "internal" }

No External Storage for this purpose.

Type Internal
type BetaNoBillingWorkspaceRole string
One of the following:
const BetaNoBillingWorkspaceRoleWorkspaceAdmin BetaNoBillingWorkspaceRole = "workspace_admin"
const BetaNoBillingWorkspaceRoleWorkspaceDeveloper BetaNoBillingWorkspaceRole = "workspace_developer"
const BetaNoBillingWorkspaceRoleWorkspaceRestrictedDeveloper BetaNoBillingWorkspaceRole = "workspace_restricted_developer"
const BetaNoBillingWorkspaceRoleWorkspaceUser BetaNoBillingWorkspaceRole = "workspace_user"
type BetaStorageMemberUnion interface{…}
One of the following:
type BetaInternalStorage struct { Type: "internal" }

No External Storage for this purpose.

Type Internal
defaultinternal
type BetaExternalStorageMember struct { Type: "external"; ExternalStorageID }

The organization's External Storage that external_storage_id names.

Type External
defaultexternal
ExternalStorageID string

The External Storage ID, which starts with estrg_. Through Claude Platform on AWS, storage whose provider_config.type is aws has its bucket ARN as its ID instead: arn:<partition>:s3:::<bucket_name>, where <partition> is the partition of the bucket's region.

type BetaStorageMemberParamUnion interface{…}
One of the following:
type BetaInternalStorageParam struct { Type: "internal" }

No External Storage for this purpose.

Type Internal
type BetaExternalStorageMemberParam struct { Type: "external"; ExternalStorageID }

The organization's External Storage that external_storage_id names.

Type External
ExternalStorageID string

The External Storage ID, which starts with estrg_. Through Claude Platform on AWS, storage whose provider_config.type is aws has its bucket ARN as its ID instead: arn:<partition>:s3:::<bucket_name>, where <partition> is the partition of the bucket's region.

type BetaTranscriptsStorageRequiredErrorDetails struct { ErrorCode }
ErrorCode BetaTranscriptsStorageRequiredErrorCode
type BetaWorkspace struct { Type: "workspace"; ID; ArchivedAt; /* 9 more */ }
type BetaWorkspaceChangedConcurrentlyErrorDetails struct { ErrorCode; Field }
ErrorCode BetaWorkspaceChangedConcurrentlyErrorCode

The request field whose change was refused. Other values may be returned. The value is a name with no data of its own.

type BetaWorkspaceChangedConcurrentlyField string
type BetaWorkspaceMember struct { Type: "workspace_member"; UserID; WorkspaceID; WorkspaceRole }
Type WorkspaceMember

Object type.

For Workspace Members, this is always "workspace_member".

defaultworkspace_member
UserID string

ID of the User.

WorkspaceID string

ID of the Workspace.

WorkspaceRole BetaWorkspaceRole

Role of the Workspace Member.

One of the following:
const BetaWorkspaceRoleWorkspaceAdmin BetaWorkspaceRole = "workspace_admin"
const BetaWorkspaceRoleWorkspaceBilling BetaWorkspaceRole = "workspace_billing"
const BetaWorkspaceRoleWorkspaceDeveloper BetaWorkspaceRole = "workspace_developer"
const BetaWorkspaceRoleWorkspaceRestrictedDeveloper BetaWorkspaceRole = "workspace_restricted_developer"
const BetaWorkspaceRoleWorkspaceUser BetaWorkspaceRole = "workspace_user"
type BetaWorkspaceRole string
One of the following:
const BetaWorkspaceRoleWorkspaceAdmin BetaWorkspaceRole = "workspace_admin"
const BetaWorkspaceRoleWorkspaceBilling BetaWorkspaceRole = "workspace_billing"
const BetaWorkspaceRoleWorkspaceDeveloper BetaWorkspaceRole = "workspace_developer"
const BetaWorkspaceRoleWorkspaceRestrictedDeveloper BetaWorkspaceRole = "workspace_restricted_developer"
const BetaWorkspaceRoleWorkspaceUser BetaWorkspaceRole = "workspace_user"
Errors
const ErrorCodeBetaHumanReviewOnWithExternalStorage ErrorCode = "human_review_on_with_external_storage"⁠HTTP status 400

The request would leave the Workspace with inference_data_privacy.safeguards_storage set to External Storage and inference_data_privacy.human_review enabled. Anthropic doesn't offer human review of data in a customer's own storage. Set human_review to disabled, or safeguards_storage to internal.

const ErrorCodeBetaTranscriptsStorageRequired ErrorCode = "transcripts_storage_required"⁠HTTP status 400

In an organization managed through AWS or Google Cloud, the request would leave the Workspace with inference_data_privacy.human_review disabled and inference_data_privacy.transcripts_storage not set to External Storage. With human review disabled, the organization reviews its own flagged requests, and it receives them only in that storage.

const ErrorCodeBetaWorkspaceChangedConcurrently ErrorCode = "workspace_changed_concurrently"⁠HTTP status 409

Another request changed the Workspace, so this request left the setting named in field as it is. The error's message says which of this request's other changes are in place. Read the Workspace and send the request again if you still want the change.

WorkspaceBatas Laju

Daftar Batas Laju Workspace
client.Beta.Organization.Workspaces.RateLimits.List(ctx, workspaceID, query) (*PageCursor[BetaWorkspaceRateLimit], error)
GET/v1/organizations/workspaces/{workspace_id}/rate_limits

Mencantumkan batas laju sebuah workspace.

Atur Batas Laju Workspace
client.Beta.Organization.Workspaces.RateLimits.Update(ctx, rateLimitID, params) (*BetaWorkspaceRateLimit, error)
POST/v1/organizations/workspaces/{workspace_id}/rate_limits/{rate_limit_id}

Mengatur atau menghapus override batas laju untuk satu grup batas laju dalam workspace.

WorkspaceAnggota

Daftar Anggota Workspace
client.Beta.Organization.Workspaces.Members.List(ctx, workspaceID, query) (*Page[BetaWorkspaceMember], error)
GET/v1/organizations/workspaces/{workspace_id}/members
Buat Anggota Workspace
client.Beta.Organization.Workspaces.Members.Add(ctx, workspaceID, body) (*BetaWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/members
Dapatkan Anggota Workspace
client.Beta.Organization.Workspaces.Members.Get(ctx, userID, query) (*BetaWorkspaceMember, error)
GET/v1/organizations/workspaces/{workspace_id}/members/{user_id}
Perbarui Anggota Workspace
client.Beta.Organization.Workspaces.Members.Update(ctx, userID, params) (*BetaWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/members/{user_id}
Hapus Anggota Workspace
client.Beta.Organization.Workspaces.Members.Remove(ctx, userID, body) (*BetaOrganizationWorkspaceMemberRemoveResponse, error)
DELETE/v1/organizations/workspaces/{workspace_id}/members/{user_id}

WorkspaceAkun Layanan

Daftar Anggota Workspace Akun Layanan
client.Beta.Organization.Workspaces.ServiceAccounts.List(ctx, workspaceID, params) (*PageCursor[BetaServiceAccountWorkspaceMember], error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts

Memerlukan token akses OAuth dengan scope org:admin, dari ant auth login --scope org:admin atau aturan workload identity federation; kunci Admin API tidak diterima. Lihat Mengelola WIF dengan Admin API.

Buat Anggota Workspace Akun Layanan
client.Beta.Organization.Workspaces.ServiceAccounts.Add(ctx, workspaceID, params) (*BetaServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts

Memerlukan token akses OAuth dengan cakupan org:admin, dari ant auth login --scope org:admin atau aturan workload identity federation; kunci API Admin tidak diterima. Lihat Mengelola WIF dengan Admin API.

Dapatkan Anggota Workspace Akun Layanan
client.Beta.Organization.Workspaces.ServiceAccounts.Get(ctx, serviceAccountID, params) (*BetaServiceAccountWorkspaceMember, error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

Memerlukan token akses OAuth dengan cakupan org:admin, dari ant auth login --scope org:admin atau aturan workload identity federation; kunci API Admin tidak diterima. Lihat Mengelola WIF dengan Admin API.

Perbarui Anggota Workspace Akun Layanan
client.Beta.Organization.Workspaces.ServiceAccounts.Update(ctx, serviceAccountID, params) (*BetaServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

Memerlukan token akses OAuth dengan cakupan org:admin, dari ant auth login --scope org:admin atau aturan workload identity federation; kunci API Admin tidak diterima. Lihat Mengelola WIF dengan Admin API.

Hapus Anggota Workspace Akun Layanan
client.Beta.Organization.Workspaces.ServiceAccounts.Remove(ctx, serviceAccountID, params) (*BetaOrganizationWorkspaceServiceAccountRemoveResponse, error)
DELETE/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

Memerlukan token akses OAuth dengan cakupan org:admin, dari ant auth login --scope org:admin atau aturan workload identity federation; kunci API Admin tidak diterima. Lihat Mengelola WIF dengan Admin API.