Workspaces
Organize API keys, manage team access, and control costs with workspaces.
Workspaces provide a way to organize your API usage within an organization. Use workspaces to separate different projects, environments, or teams while maintaining centralized billing and administration.
How workspaces work
Every organization has a Default Workspace that cannot be renamed, archived, or deleted. When you create additional workspaces, you can assign members, service accounts, API keys, and resource limits to each one.
Key characteristics:
- Workspace identifiers use the
wrkspc_prefix (for example,wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ) - Maximum 100 workspaces per organization by default (archived workspaces don't count); contact your account team if you need more
- Default Workspace has a
wrkspc_ID like any other workspace (returned in theanthropic-workspace-idresponse header and accepted by Get Workspace), but it doesn't appear in List Workspaces results, and API keys, usage reports, and cost reports shownullfor itsworkspace_id, as do all-workspaces API keys (an API key'sscopefield tells them apart; for a key bound to the Default Workspace it carries the real ID) - API keys can be scoped to a single workspace. In this case, they can only access resources within that workspace. Some API keys can be granted permissions across multiple workspaces, and provide a workspace ID header to access resources within that workspace
Claude Code workspace
When a member of your organization first signs in to Claude Code with their Claude Console account, Anthropic automatically creates a Claude Code workspace in the organization and adds that member to it. Every subsequent member who signs in to Claude Code is added the same way.
The Claude Code workspace keeps Claude Code traffic separate from your other API workloads:
- Claude Code mints a per-user API key in this workspace at sign-in. You cannot create keys in it manually from the Console.
- A Claude Code key stops working if its owner is removed from the workspace or organization, unlike a workspace key.
- Claude Code usage is rate-limited separately, and admins can cap its share of the organization's limits under Settings > Workspaces.
- It is the only workspace that supports per-user monthly spend limits.
Workspace roles and permissions
Members can have different roles in each workspace, allowing fine-grained access control.
| Role | Permissions |
|---|---|
| Workspace User | Use playground only |
| Workspace Limited Developer | Create and manage API keys, use the API. Cannot access session tracing views or download files. |
| Workspace Developer | Create and manage API keys, use the API |
| Workspace Admin | Full control over workspace settings and members |
| Workspace Billing | View workspace billing information (inherited from organization billing role) |
Role inheritance
- Organization admins automatically receive Workspace Admin access to all workspaces
- Organization billing members automatically receive Workspace Billing access to all workspaces
- Organization users and developers must be explicitly added to each workspace
- Service accounts are added to workspaces from the service account's page in Settings → Service accounts or from the workspace's Service accounts tab
Managing workspaces
Using the Console
Create and manage workspaces in the Claude Console.
Create a workspace
Open workspace settings
In the Claude Console, go to Settings > Workspaces.
Create a workspace
Click Create workspace.
Configure the workspace
Enter a workspace name and select a color for visual identification.
Create the workspace
Click Create to finalize.
Edit workspace details
To modify a workspace's name or color:
- Select the workspace from the list.
- Click the ellipsis menu (...) and choose Edit details.
- Update the name or color and save your changes.
Add members to a workspace
- Navigate to the workspace's Members tab.
- Click Add to Workspace.
- Select an organization member and assign them a workspace role.
- Confirm the addition.
To remove a member, click the trash icon next to their name.
Set workspace limits
Each workspace's settings split these across two tabs:
- Rate limits: On the Rate limits tab, set limits per model tier for requests per minute, input tokens, or output tokens
- Spend limits: On the Spend limits tab, cap monthly spending and configure alerts when spending reaches certain thresholds
Archive a workspace
To archive a workspace, click the ellipsis menu (...) and select Archive. Archiving:
- Preserves historical data for reporting
- Deactivates the workspace and archives every API key created for it
- Cannot be undone
Using the Admin API
Programmatically manage workspaces using the Admin API.
The following SDK and CLI examples construct the default client, which reads the Admin API key from the ANTHROPIC_API_KEY environment variable; the SDKs expose these endpoints under client.beta.organization.workspaces. SDK list methods fetch further pages on demand, so limit sets the page size; the PHP, Ruby, and curl examples return one page.
Create a workspace:
client = anthropic.Anthropic()
workspace = client.beta.organization.workspaces.create(name="Production")
print(f"id: {workspace.id}")
print(f"name: {workspace.name}")List workspaces:
client = anthropic.Anthropic()
workspaces = client.beta.organization.workspaces.list(limit=10, include_archived=False)
for workspace in workspaces:
print(f"{workspace.id}: {workspace.name}")Archive a workspace:
client = anthropic.Anthropic()
workspace = client.beta.organization.workspaces.archive(
"wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
)
print(f"id: {workspace.id}")
print(f"archived_at: {workspace.archived_at}")For complete parameter details and response schemas, see the Workspaces API reference.
Managing workspace members
Add a member to a workspace:
client = anthropic.Anthropic()
member = client.beta.organization.workspaces.members.add(
"wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
user_id="user_01XyDMpzjS89pFZXqSFUBDr6",
workspace_role="workspace_developer",
)
print(f"user_id: {member.user_id}")
print(f"workspace_role: {member.workspace_role}")Update a member's role:
client = anthropic.Anthropic()
member = client.beta.organization.workspaces.members.update(
"user_01XyDMpzjS89pFZXqSFUBDr6",
workspace_id="wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
workspace_role="workspace_admin",
)
print(f"user_id: {member.user_id}")
print(f"workspace_role: {member.workspace_role}")Remove a member from a workspace:
client = anthropic.Anthropic()
removed_member = client.beta.organization.workspaces.members.remove(
"user_01XyDMpzjS89pFZXqSFUBDr6"