Claude Platform Docs

Workspaces

List Workspaces
client.beta.organization.workspaces.list(query?, options?): Page<BetaWorkspace>
GET/v1/organizations/workspaces
Create Workspace
client.beta.organization.workspaces.create(params, options?): BetaWorkspace
POST/v1/organizations/workspaces
Get Workspace
client.beta.organization.workspaces.retrieve(workspaceID, options?): BetaWorkspace
GET/v1/organizations/workspaces/{workspace_id}
Update Workspace
client.beta.organization.workspaces.update(workspaceID, body, options?): BetaWorkspace
POST/v1/organizations/workspaces/{workspace_id}
Archive Workspace
client.beta.organization.workspaces.archive(workspaceID, options?): BetaWorkspace
POST/v1/organizations/workspaces/{workspace_id}/archive
Models
type BetaAllowedInferenceGeo = "global" | "us"
One of the following:
"global"
"us"
interface BetaDataResidency { allowed_inference_geos; default_inference_geo; workspace_geo }
allowed_inference_geos: Array<BetaAllowedInferenceGeo> | "unrestricted"

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

One of the following:
"global"
"us"
"unrestricted"
default_inference_geo: "global" | "us"

Default inference geo applied when requests omit the parameter.

One of the following:
"global"
"us"
workspace_geo: "us"

Geographic region for workspace data storage. Immutable after creation.

interface BetaDataResidencyCreateConfig { allowed_inference_geos; default_inference_geo; workspace_geo }
allowed_inference_geos?: Array<BetaAllowedInferenceGeo> | "unrestricted" | null

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:
"global"
"us"
"unrestricted"
default_inference_geo?: "global" | "us" | null

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:
"global"
"us"
workspace_geo?: "us" | null

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

interface BetaDataResidencyUpdateConfig { allowed_inference_geos; default_inference_geo }
allowed_inference_geos?: Array<BetaAllowedInferenceGeo> | "unrestricted" | null

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

One of the following:
"global"
"us"
"unrestricted"
default_inference_geo?: "global" | "us" | null

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:
"global"
"us"
type BetaNoBillingWorkspaceRole = "workspace_admin" | "workspace_developer" | "workspace_restricted_developer" | "workspace_user"
One of the following:
"workspace_admin"
"workspace_developer"
"workspace_restricted_developer"
"workspace_user"
interface BetaWorkspace { type: "workspace"; id; archived_at; /* 8 more */ }
interface BetaWorkspaceMember { type: "workspace_member"; user_id; workspace_id; workspace_role }
type: "workspace_member"

Object type.

For Workspace Members, this is always "workspace_member".

defaultworkspace_member
user_id: string

ID of the User.

workspace_id: string

ID of the Workspace.

workspace_role: BetaWorkspaceRole

Role of the Workspace Member.

One of the following:
"workspace_admin"
"workspace_billing"
"workspace_developer"
"workspace_restricted_developer"
"workspace_user"
type BetaWorkspaceRole = "workspace_admin" | "workspace_billing" | "workspace_developer" | 2 more
One of the following:
"workspace_admin"
"workspace_billing"
"workspace_developer"
"workspace_restricted_developer"
"workspace_user"

WorkspacesRate Limits

List Workspace Rate Limits
client.beta.organization.workspaces.rateLimits.list(workspaceID, query?, options?): PageCursor<BetaWorkspaceRateLimit>
GET/v1/organizations/workspaces/{workspace_id}/rate_limits

List a workspace's rate limits.

Set Workspace Rate Limits
client.beta.organization.workspaces.rateLimits.update(rateLimitID, params, options?): BetaWorkspaceRateLimit
POST/v1/organizations/workspaces/{workspace_id}/rate_limits/{rate_limit_id}

Set or clear rate-limit overrides for one rate-limit group in a workspace.

WorkspacesMembers

List Workspace Members
client.beta.organization.workspaces.members.list(workspaceID, query?, options?): Page<BetaWorkspaceMember>
GET/v1/organizations/workspaces/{workspace_id}/members
Create Workspace Member
client.beta.organization.workspaces.members.add(workspaceID, body, options?): BetaWorkspaceMember
POST/v1/organizations/workspaces/{workspace_id}/members
Get Workspace Member
client.beta.organization.workspaces.members.retrieve(userID, params, options?): BetaWorkspaceMember
GET/v1/organizations/workspaces/{workspace_id}/members/{user_id}
Update Workspace Member
client.beta.organization.workspaces.members.update(userID, params, options?): BetaWorkspaceMember
POST/v1/organizations/workspaces/{workspace_id}/members/{user_id}
Delete Workspace Member
client.beta.organization.workspaces.members.remove(userID, params, options?): MemberRemoveResponse
DELETE/v1/organizations/workspaces/{workspace_id}/members/{user_id}

WorkspacesService Accounts

List Service Account Workspace Members
client.beta.organization.workspaces.serviceAccounts.list(workspaceID, params?, options?): PageCursor<BetaServiceAccountWorkspaceMember>
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.beta.organization.workspaces.serviceAccounts.add(workspaceID, params, options?): BetaServiceAccountWorkspaceMember
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.beta.organization.workspaces.serviceAccounts.retrieve(serviceAccountID, params, options?): BetaServiceAccountWorkspaceMember
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.beta.organization.workspaces.serviceAccounts.update(serviceAccountID, params, options?): BetaServiceAccountWorkspaceMember
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.beta.organization.workspaces.serviceAccounts.remove(serviceAccountID, params, options?): ServiceAccountRemoveResponse
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.