Follow Discord
Sweep 30 Oct 2026 · 01:02Z Build v2.1.314 532 read Stable v2.1.308 Latest v2.1.314 Next v2.1.314 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

workspaces changedmanage-claude/workspaces

Nearest release: v2.1.314, published 6 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+162added
Lines−19removed
From line 14 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits26to this page, all time

The whole hunk

from line 14, old and new numbered
/
lines
from line 14
1414 
1515* **Workspace identifiers** use the `wrkspc_` prefix (for example, `wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ`).
1616* **Maximum 100 workspaces** for each organization by default (archived workspaces don’t count). Contact your account team if you need more.
17* **Default Workspace** has a `wrkspc_` ID like any other workspace (returned in the [`anthropic-workspace-id` response header](https://platform.claude.com/docs/en/manage-claude/workspaces#identify-the-workspace-behind-an-api-response) and accepted by [Get Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve)), but it appears in [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) results only when you pass `include_default=true`, and usage reports and cost reports show `null` for its `workspace_id` (an API key’s `scope` field carries the real ID for a key bound to the Default Workspace).
17* **Default Workspace** has a `wrkspc_` ID like any other workspace (returned in the [`anthropic-workspace-id` response header](https://platform.claude.com/docs/en/manage-claude/workspaces#identify-the-workspace-behind-an-api-response) and accepted by [Get Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve)), but it appears in [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) results only when you pass `include_default=true`. The [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) reports its usage and cost under that ID, whereas the legacy [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api) reports show `null` for its `workspace_id` (an API key’s `scope` field carries the real ID for a key bound to the Default Workspace).
1818* **API keys** can be scoped to a single workspace. In this case, they can only access resources within that workspace. Other API keys aren’t scoped to a workspace. With one of these keys, send a [workspace ID header](https://platform.claude.com/docs/en/manage-claude/authentication#select-a-workspace) on each request to choose the workspace. The key’s user or service account must have access to that workspace.
1919 
2020### Claude Code workspace
from line 1010
10101010With the workspace ID from a response, you can:
10111011 
10121012* Confirm which workspace’s usage, cost, and [rate limits](https://platform.claude.com/docs/en/api/rate-limits) the request counted toward
1013* Match it against the `workspace_id` field in [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api) reports, which is `null` for the Default Workspace. Also match it against the `scope` field of API keys in the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api), which carries the real ID of the workspace a key is bound to, including the Default Workspace
1013* Match it against the `workspace_id` field in [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) rows, which carry this same ID for the Default Workspace, and against the `scope` field of API keys in the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api), which carries the real ID of the workspace a key is bound to, including the Default Workspace
10141014* Check whether it’s your Default Workspace’s ID by passing it to [Get Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve) with an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys): the Default Workspace comes back with `"name": "Default"`, even though [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) omits it unless you pass `include_default=true`
10151015* Open that workspace in the [Console](https://platform.claude.com/settings/workspaces) to find the request’s resources, such as sessions, files, message batches, and skills
10161016 
from line 1035
10351035 
10361036## Usage and cost tracking
10371037 
1038Track usage and costs by workspace using the [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api):
1038Track usage and costs by workspace using the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api):
10391039 
1040```bash cURL
1041curl "https://api.anthropic.com/v1/organizations/usage_report/messages?\
1042starting_at=2025-01-01T00:00:00Z&\
1043ending_at=2025-01-08T00:00:00Z&\
1044workspace_ids[]=wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ&\
1045group_by[]=workspace_id&\
1046bucket_width=1d" \
1047 -H "anthropic-version: 2023-06-01" \
1048 -H "x-api-key: $ANTHROPIC_ADMIN_KEY"
1049```
1040<CodeGroup>
1041 ```bash cURL
1042 curl --globoff "https://api.anthropic.com/v1/organizations/analytics/usage?\
1043 starting_at=2026-09-01T00:00:00Z&\
1044 ending_at=2026-09-08T00:00:00Z&\
1045 workspace_ids[]=wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ&\
1046 group_by[]=workspace_id&\
1047 time_bucket_width=1d" \
1048 -H "anthropic-version: 2023-06-01" \
1049 -H "anthropic-beta: analytics-usage-cost-2026-08-24" \
1050 -H "x-api-key: $ANTHROPIC_API_KEY"
1051 ```
10501052 
1051Usage and costs attributed to the Default Workspace have a `null` value for `workspace_id`.
1053 ```bash CLI
1054 ant beta:organization:analytics:usage list \
1055 --starting-at 2026-09-01T00:00:00Z \
1056 --ending-at 2026-09-08T00:00:00Z \
1057 --time-bucket-width 1d \
1058 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ \
1059 --group-by workspace_id
1060 ```
10521061 
1062 ```python Python
1063 client = anthropic.Anthropic()
1064 
1065 rows = client.beta.organization.analytics.usage.list(
1066 starting_at="2026-09-01T00:00:00Z",
1067 ending_at="2026-09-08T00:00:00Z",
1068 time_bucket_width="1d",
1069 workspace_ids=["wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"],
1070 group_by=["workspace_id"],
1071 )
1072 
1073 for row in rows:
1074 print(f"{row.starting_at} {row.group.workspace_id}: {row.usage.total_tokens}")
1075 ```
1076 
1077 ```typescript TypeScript
1078 const client = new Anthropic();
1079 
1080 const rows = await client.beta.organization.analytics.usage.list({
1081 starting_at: "2026-09-01T00:00:00Z",
1082 ending_at: "2026-09-08T00:00:00Z",
1083 time_bucket_width: "1d",
1084 workspace_ids: ["wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"],
1085 group_by: ["workspace_id"]
1086 });
1087 
1088 for await (const row of rows) {
1089 console.log(`${row.starting_at} ${row.group.workspace_id}: ${row.usage.total_tokens}`);
1090 }
1091 ```
1092 
1093 ```csharp C#
1094 using Anthropic.Models.Beta.Organization.Analytics;
1095 using Anthropic.Models.Beta.Organization.Analytics.Usage;
1096 
1097 AnthropicClient client = new();
1098 
1099 var page = await client.Beta.Organization.Analytics.Usage.List(
1100 new()
1101 {
1102 StartingAt = DateTimeOffset.Parse("2026-09-01T00:00:00Z"),
1103 EndingAt = DateTimeOffset.Parse("2026-09-08T00:00:00Z"),
1104 TimeBucketWidth = BetaAnalyticsTimeBucketWidth.Day,
1105 WorkspaceIds = ["wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"],
1106 GroupBy = [BetaAnalyticsUsageGroupBy.WorkspaceID],
1107 }
1108 );
1109 
1110 await foreach (var row in page.Paginate())
1111 {
1112 Console.WriteLine($"{row.StartingAt} {row.Group.WorkspaceID}: {row.Usage.TotalTokens}");
1113 }
1114 ```
1115 
1116 ```go Go
1117 client := anthropic.NewClient()
1118 
1119 rows := client.Beta.Organization.Analytics.Usage.ListAutoPaging(context.Background(), anthropic.BetaOrganizationAnalyticsUsageListParams{
1120 StartingAt: time.Date(2026, time.September, 1, 0, 0, 0, 0, time.UTC),
1121 EndingAt: anthropic.Time(time.Date(2026, time.September, 8, 0, 0, 0, 0, time.UTC)),
1122 TimeBucketWidth: anthropic.BetaAnalyticsTimeBucketWidthDay,
1123 WorkspaceIDs: []string{"wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"},
1124 GroupBy: []anthropic.BetaAnalyticsUsageGroupBy{anthropic.BetaAnalyticsUsageGroupByWorkspaceID},
1125 })
1126 
1127 for rows.Next() {
1128 row := rows.Current()
1129 fmt.Printf("%s %s: %d\n", row.StartingAt.Format(time.RFC3339), row.Group.WorkspaceID, row.Usage.TotalTokens)
1130 }
1131 if err := rows.Err(); err != nil {
1132 log.Fatal(err)
1133 }
1134 ```
1135 
1136 ```java Java
1137 import com.anthropic.models.beta.organization.analytics.BetaAnalyticsTimeBucketWidth;
1138 import com.anthropic.models.beta.organization.analytics.usage.BetaAnalyticsUsageGroupBy;
1139 import com.anthropic.models.beta.organization.analytics.usage.UsageListParams;
1140 import java.time.OffsetDateTime;
1141 
1142 void main() {
1143 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
1144 
1145 var params = UsageListParams.builder()
1146 .startingAt(OffsetDateTime.parse("2026-09-01T00:00:00Z"))
1147 .endingAt(OffsetDateTime.parse("2026-09-08T00:00:00Z"))
1148 .timeBucketWidth(BetaAnalyticsTimeBucketWidth.DAY)
1149 .addWorkspaceId("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
1150 .addGroupBy(BetaAnalyticsUsageGroupBy.WORKSPACE_ID)
1151 .build();
1152 var rows = client.beta().organization().analytics().usage().list(params);
1153 
1154 for (var row : rows.autoPager()) {
1155 IO.println(row.startingAt() + " " + row.group().workspaceId().orElse(null) + ": " + row.usage().totalTokens());
1156 }
1157 }
1158 ```
1159 
1160 ```php PHP
1161 $client = new Client();
1162 
1163 $rows = $client->beta->organization->analytics->usage->list(
1164 startingAt: new \DateTimeImmutable('2026-09-01T00:00:00Z'),
1165 endingAt: new \DateTimeImmutable('2026-09-08T00:00:00Z'),
1166 timeBucketWidth: '1d',
1167 workspaceIDs: ['wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ'],
1168 groupBy: ['workspace_id'],
1169 );
1170 
1171 foreach ($rows->pagingEachItem() as $row) {
1172 $startingAt = $row->startingAt->format(\DateTimeInterface::ATOM);
1173 echo "{$startingAt} {$row->group->workspaceID}: {$row->usage->totalTokens}\n";
1174 }
1175 ```
1176 
1177 ```ruby Ruby
1178 client = Anthropic::Client.new
1179 
1180 page = client.beta.organization.analytics.usage.list(
1181 starting_at: Time.utc(2026, 9, 1),
1182 ending_at: Time.utc(2026, 9, 8),
1183 time_bucket_width: :"1d",
1184 workspace_ids: ["wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"],
1185 group_by: [:workspace_id]
1186 )
1187 
1188 page.auto_paging_each do |row|
1189 puts "#{row.starting_at} #{row.group.workspace_id}: #{row.usage.total_tokens}"
1190 end
1191 ```
1192</CodeGroup>
1193 
1194Usage and costs in the Default Workspace are reported under the Default Workspace’s own ID.
1195 
10531196## Common use cases
10541197 
10551198### Environment separation
from line 1237
10941237 </Step>
10951238 
10961239 <Step title="Monitor usage">
1097 Use the [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api) to track workspace-level consumption.
1240 Use the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) to track workspace-level consumption.
10981241 </Step>
10991242</Steps>
11001243 
from line 1245
11021245 
11031246<AccordionGroup>
11041247 <Accordion title="What’s the Default Workspace?">
1105 Every organization has a “Default Workspace” that cannot be renamed, archived, or deleted. Like every workspace, it has a `wrkspc_` ID: the API returns it in the [`anthropic-workspace-id` response header](https://platform.claude.com/docs/en/manage-claude/workspaces#identify-the-workspace-behind-an-api-response), and you can pass it to [Get Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve) and [Update Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/update). It has no member list of its own, because access to it follows each member’s organization role. It appears in [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) results only when you pass `include_default=true`, and usage reports and cost reports that belong to it show `null` for `workspace_id`. For an API key that belongs to it, the key’s `scope` field carries the workspace’s real ID.
1248 Every organization has a “Default Workspace” that cannot be renamed, archived, or deleted. Like every workspace, it has a `wrkspc_` ID: the API returns it in the [`anthropic-workspace-id` response header](https://platform.claude.com/docs/en/manage-claude/workspaces#identify-the-workspace-behind-an-api-response), and you can pass it to [Get Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve) and [Update Workspace](https://platform.claude.com/docs/en/api/organization/workspaces/update). It has no member list of its own, because access to it follows each member’s organization role. It appears in [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) results only when you pass `include_default=true`. The [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) reports its usage and cost under its real ID. The legacy [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api) reports show `null` for `workspace_id`. For an API key that belongs to it, the key’s `scope` field carries the workspace’s real ID.
11061249 </Accordion>
11071250 
11081251 <Accordion title="What’s the Claude Code workspace?">
from line 1286
11431286* [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api)
11441287* [Admin API reference](https://platform.claude.com/docs/en/api/organization)
11451288* [Rate limits](https://platform.claude.com/docs/en/api/rate-limits)
1146* [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api)
1289* [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) and the legacy [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api)
11471290 
Feedback