Claude Platform Docs

Workspaces

List Workspaces
client.Beta.Organization.Workspaces.List(ctx, query) (*Page[BetaWorkspace], error)
GET/v1/organizations/workspaces
Create Workspace
client.Beta.Organization.Workspaces.New(ctx, params) (*BetaWorkspace, error)
POST/v1/organizations/workspaces
Get Workspace
client.Beta.Organization.Workspaces.Get(ctx, workspaceID) (*BetaWorkspace, error)
GET/v1/organizations/workspaces/{workspace_id}
Update Workspace
client.Beta.Organization.Workspaces.Update(ctx, workspaceID, body) (*BetaWorkspace, error)
POST/v1/organizations/workspaces/{workspace_id}
Archive Workspace
client.Beta.Organization.Workspaces.Archive(ctx, workspaceID) (*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 BetaDataResidency struct{…}
AllowedInferenceGeos BetaDataResidencyAllowedInferenceGeosUnion

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

One of the following:
type BetaDataResidencyAllowedInferenceGeosGeos []string
type Unrestricted string
DefaultInferenceGeo string

Default inference geo applied when requests omit the parameter.

WorkspaceGeo string

Geographic region for workspace data storage. Immutable after creation.

type BetaDataResidencyCreateConfig struct{…}
AllowedInferenceGeos BetaDataResidencyCreateConfigAllowedInferenceGeosUnion 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 BetaDataResidencyUpdateConfig struct{…}
AllowedInferenceGeos BetaDataResidencyUpdateConfigAllowedInferenceGeosUnion 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 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 BetaWorkspace struct{…}
type BetaWorkspaceMember struct{…}
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"

WorkspacesRate Limits

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

WorkspacesMembers

List Workspace Members
client.Beta.Organization.Workspaces.Members.List(ctx, workspaceID, query) (*Page[BetaWorkspaceMember], error)
GET/v1/organizations/workspaces/{workspace_id}/members
Create Workspace Member
client.Beta.Organization.Workspaces.Members.Add(ctx, workspaceID, body) (*BetaWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/members
Get Workspace Member
client.Beta.Organization.Workspaces.Members.Get(ctx, userID, query) (*BetaWorkspaceMember, error)
GET/v1/organizations/workspaces/{workspace_id}/members/{user_id}
Update Workspace Member
client.Beta.Organization.Workspaces.Members.Update(ctx, userID, params) (*BetaWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/members/{user_id}
Delete Workspace Member
client.Beta.Organization.Workspaces.Members.Remove(ctx, userID, body) (*BetaOrganizationWorkspaceMemberRemoveResponse, error)
DELETE/v1/organizations/workspaces/{workspace_id}/members/{user_id}
List Service Account Workspace Members
client.Beta.Organization.Workspaces.ServiceAccounts.List(ctx, workspaceID, params) (*PageCursor[BetaServiceAccountWorkspaceMember], error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts
Create Service Account Workspace Member
client.Beta.Organization.Workspaces.ServiceAccounts.Add(ctx, workspaceID, params) (*BetaServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts
Get Service Account Workspace Member
client.Beta.Organization.Workspaces.ServiceAccounts.Get(ctx, serviceAccountID, params) (*BetaServiceAccountWorkspaceMember, error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}
Update Service Account Workspace Member
client.Beta.Organization.Workspaces.ServiceAccounts.Update(ctx, serviceAccountID, params) (*BetaServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}
Delete Service Account Workspace Member
client.Beta.Organization.Workspaces.ServiceAccounts.Remove(ctx, serviceAccountID, params) (*BetaOrganizationWorkspaceServiceAccountRemoveResponse, error)
DELETE/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}