Follow Discord
Sweep 08 Oct 2026 · 18:53Z Build v2.1.295 516 read Stable v2.1.286 Latest v2.1.295 Next v2.1.295 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

workspaces changedmanage-claude/workspaces

Nearest release: v2.1.292, published 11 hours before 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+76added
Lines−78removed
From line 14 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits13to 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** per 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/beta/organization/workspaces/retrieve)), but it appears in [List Workspaces](https://platform.claude.com/docs/en/api/beta/organization/workspaces/list) results only when you pass `include_default=true`, and API keys, usage reports, and cost reports show `null` for its `workspace_id`, as do all-workspaces API keys (an API key's `scope` field tells them apart; for a key bound to the Default Workspace it carries the real ID)
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 API keys, usage reports, and cost reports show `null` for its `workspace_id`, as do all-workspaces API keys (an API key's `scope` field tells them apart; for a key bound to the Default Workspace it carries the real ID)
1818* **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](https://platform.claude.com/docs/en/manage-claude/authentication#select-a-workspace) to access resources within that workspace
1919 
2020### Claude Code workspace
from line 141
141141 Admin API endpoints accept an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys), an `org:admin` OAuth token, or a personal or service account key that isn't scoped to a specific workspace. Workspace keys don't work there. See [Authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication).
142142</Note>
143143 
144The 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.
144The 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.organization.workspaces` (csharp, go: `client.Organization.Workspaces`; java: `client.organization().workspaces()`; php: `$client->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.
145145 
146146Create a workspace:
147147 
from line 155
155155 ```
156156 
157157 ```bash CLI
158 ant beta:organization:workspaces create --name Production
158 ant organization:workspaces create --name Production
159159 ```
160160 
161161 ```python Python
162162 client = anthropic.Anthropic()
163163 
164 workspace = client.beta.organization.workspaces.create(name="Production")
164 workspace = client.organization.workspaces.create(name="Production")
165165 
166166 print(f"id: {workspace.id}")
167167 print(f"name: {workspace.name}")
from line 170
170170 ```typescript TypeScript
171171 const client = new Anthropic();
172172 
173 const workspace = await client.beta.organization.workspaces.create({ name: "Production" });
173 const workspace = await client.organization.workspaces.create({ name: "Production" });
174174 
175175 console.log(`id: ${workspace.id}`);
176176 console.log(`name: ${workspace.name}`);
from line 179
179179 ```csharp C#
180180 AnthropicClient client = new();
181181 
182 var workspace = await client.Beta.Organization.Workspaces.Create(new()
182 var workspace = await client.Organization.Workspaces.Create(new()
183183 {
184184 Name = "Production"
185185 });
from line 191
191191 ```go Go
192192 client := anthropic.NewClient()
193193 
194 workspace, err := client.Beta.Organization.Workspaces.New(context.Background(), anthropic.BetaOrganizationWorkspaceNewParams{
194 workspace, err := client.Organization.Workspaces.New(context.Background(), anthropic.OrganizationWorkspaceNewParams{
195195 Name: "Production",
196196 })
197197 if err != nil {
from line 203
203203 ```
204204 
205205 ```java Java
206 import com.anthropic.models.beta.organization.workspaces.WorkspaceCreateParams;
206 import com.anthropic.models.organization.workspaces.WorkspaceCreateParams;
207207 
208208 void main() {
209209 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 211
211211 var params = WorkspaceCreateParams.builder()
212212 .name("Production")
213213 .build();
214 var workspace = client.beta().organization().workspaces().create(params);
214 var workspace = client.organization().workspaces().create(params);
215215 
216216 IO.println("id: " + workspace.id());
217217 IO.println("name: " + workspace.name());
from line 221
221221 ```php PHP
222222 $client = new Client();
223223 
224 $workspace = $client->beta->organization->workspaces->create(
224 $workspace = $client->organization->workspaces->create(
225225 name: 'Production',
226226 );
227227 
from line 232
232232 ```ruby Ruby
233233 client = Anthropic::Client.new
234234 
235 workspace = client.beta.organization.workspaces.create(name: "Production")
235 workspace = client.organization.workspaces.create(name: "Production")
236236 
237237 puts "id: #{workspace.id}"
238238 puts "name: #{workspace.name}"
from line 249
249249 ```
250250 
251251 ```bash CLI
252 ant beta:organization:workspaces list --limit 10 --include-archived=false
252 ant organization:workspaces list --limit 10 --include-archived=false
253253 ```
254254 
255255 ```python Python
256256 client = anthropic.Anthropic()
257257 
258 workspaces = client.beta.organization.workspaces.list(limit=10, include_archived=False)
258 workspaces = client.organization.workspaces.list(limit=10, include_archived=False)
259259 
260260 for workspace in workspaces:
261261 print(f"{workspace.id}: {workspace.name}")
from line 264
264264 ```typescript TypeScript
265265 const client = new Anthropic();
266266 
267 const workspaces = await client.beta.organization.workspaces.list({
267 const workspaces = await client.organization.workspaces.list({
268268 limit: 10,
269269 include_archived: false
270270 });
from line 277
277277 ```csharp C#
278278 AnthropicClient client = new();
279279 
280 var workspaces = await client.Beta.Organization.Workspaces.List(new()
280 var workspaces = await client.Organization.Workspaces.List(new()
281281 {
282282 Limit = 10,
283283 IncludeArchived = false
from line 292
292292 ```go Go
293293 client := anthropic.NewClient()
294294 
295 workspaces := client.Beta.Organization.Workspaces.ListAutoPaging(context.Background(), anthropic.BetaOrganizationWorkspaceListParams{
295 workspaces := client.Organization.Workspaces.ListAutoPaging(context.Background(), anthropic.OrganizationWorkspaceListParams{
296296 Limit: anthropic.Int(10),
297297 IncludeArchived: anthropic.Bool(false),
298298 })
from line 307
307307 ```
308308 
309309 ```java Java
310 import com.anthropic.models.beta.organization.workspaces.WorkspaceListParams;
310 import com.anthropic.models.organization.workspaces.WorkspaceListParams;
311311 
312312 void main() {
313313 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 316
316316 .limit(10)
317317 .includeArchived(false)
318318 .build();
319 var workspaces = client.beta().organization().workspaces().list(params);
319 var workspaces = client.organization().workspaces().list(params);
320320 
321321 for (var workspace : workspaces.autoPager()) {
322322 IO.println(workspace.id() + ": " + workspace.name());
from line 327
327327 ```php PHP
328328 $client = new Client();
329329 
330 $workspaces = $client->beta->organization->workspaces->list(
330 $workspaces = $client->organization->workspaces->list(
331331 limit: 10,
332332 includeArchived: false,
333333 );
from line 340
340340 ```ruby Ruby
341341 client = Anthropic::Client.new
342342 
343 workspaces = client.beta.organization.workspaces.list(limit: 10, include_archived: false)
343 workspaces = client.organization.workspaces.list(limit: 10, include_archived: false)
344344 
345345 workspaces.data.each do |workspace|
346346 puts "#{workspace.id}: #{workspace.name}"
from line 358
358358 ```
359359 
360360 ```bash CLI
361 ant beta:organization:workspaces archive --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ
361 ant organization:workspaces archive --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ
362362 ```
363363 
364364 ```python Python
365365 client = anthropic.Anthropic()
366366 
367 workspace = client.beta.organization.workspaces.archive(
368 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
369 )
367 workspace = client.organization.workspaces.archive("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
370368 
371369 print(f"id: {workspace.id}")
372370 print(f"archived_at: {workspace.archived_at}")
from line 373
375373 ```typescript TypeScript
376374 const client = new Anthropic();
377375 
378 const workspace = await client.beta.organization.workspaces.archive(
376 const workspace = await client.organization.workspaces.archive(
379377 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
380378 );
381379 
from line 384
386384 ```csharp C#
387385 AnthropicClient client = new();
388386 
389 var workspace = await client.Beta.Organization.Workspaces.Archive(
387 var workspace = await client.Organization.Workspaces.Archive(
390388 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
391389 );
392390 
from line 395
397395 ```go Go
398396 client := anthropic.NewClient()
399397 
400 workspace, err := client.Beta.Organization.Workspaces.Archive(context.Background(), "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
398 workspace, err := client.Organization.Workspaces.Archive(context.Background(), "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
401399 if err != nil {
402400 log.Fatal(err)
403401 }
from line 407
409407 ```java Java
410408 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
411409 
412 var workspace = client.beta().organization().workspaces()
410 var workspace = client.organization().workspaces()
413411 .archive("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ");
414412 
415413 IO.println("id: " + workspace.id());
from line 417
419417 ```php PHP
420418 $client = new Client();
421419 
422 $workspace = $client->beta->organization->workspaces->archive(
420 $workspace = $client->organization->workspaces->archive(
423421 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
424422 );
425423 
from line 429
431429 client = Anthropic::Client.new
432430 
433431 workspace_id = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
434 workspace = client.beta.organization.workspaces.archive(workspace_id)
432 workspace = client.organization.workspaces.archive(workspace_id)
435433 
436434 puts "id: #{workspace.id}"
437435 puts "archived_at: #{workspace.archived_at}"
from line 436
438436 ```
439437</CodeGroup>
440438 
441For complete parameter details and response schemas, see the [Workspaces API reference](https://platform.claude.com/docs/en/api/beta/organization/workspaces/retrieve).
439For complete parameter details and response schemas, see the [Workspaces API reference](https://platform.claude.com/docs/en/api/organization/workspaces/retrieve).
442440 
443441### Managing workspace members
444442 
from line 455
457455 ```
458456 
459457 ```bash CLI
460 ant beta:organization:workspaces:members add \
458 ant organization:workspaces:members add \
461459 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ \
462460 --user-id user_01XyDMpzjS89pFZXqSFUBDr6 \
463461 --workspace-role workspace_developer
from line 464
466464 ```python Python
467465 client = anthropic.Anthropic()
468466 
469 member = client.beta.organization.workspaces.members.add(
467 member = client.organization.workspaces.members.add(
470468 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
471469 user_id="user_01XyDMpzjS89pFZXqSFUBDr6",
472470 workspace_role="workspace_developer",
from line 477
479477 ```typescript TypeScript
480478 const client = new Anthropic();
481479 
482 const member = await client.beta.organization.workspaces.members.add(
480 const member = await client.organization.workspaces.members.add(
483481 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
484482 {
485483 user_id: "user_01XyDMpzjS89pFZXqSFUBDr6",
from line 490
492490 ```
493491 
494492 ```csharp C#
495 using Anthropic.Models.Beta.Organization.Workspaces;
493 using Anthropic.Models.Organization.Workspaces;
496494 
497495 AnthropicClient client = new();
498496 
499 var member = await client.Beta.Organization.Workspaces.Members.Add(
497 var member = await client.Organization.Workspaces.Members.Add(
500498 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
501499 new()
502500 {
503501 UserID = "user_01XyDMpzjS89pFZXqSFUBDr6",
504 WorkspaceRole = BetaNoBillingWorkspaceRole.WorkspaceDeveloper
502 WorkspaceRole = NoBillingWorkspaceRole.WorkspaceDeveloper
505503 }
506504 );
507505 
from line 510
512510 ```go Go
513511 client := anthropic.NewClient()
514512 
515 member, err := client.Beta.Organization.Workspaces.Members.Add(
513 member, err := client.Organization.Workspaces.Members.Add(
516514 context.Background(),
517515 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
518 anthropic.BetaOrganizationWorkspaceMemberAddParams{
516 anthropic.OrganizationWorkspaceMemberAddParams{
519517 UserID: "user_01XyDMpzjS89pFZXqSFUBDr6",
520 WorkspaceRole: anthropic.BetaNoBillingWorkspaceRoleWorkspaceDeveloper,
518 WorkspaceRole: anthropic.NoBillingWorkspaceRoleWorkspaceDeveloper,
521519 },
522520 )
523521 if err != nil {
from line 527
529527 ```
530528 
531529 ```java Java
532 import com.anthropic.models.beta.organization.workspaces.BetaNoBillingWorkspaceRole;
533 import com.anthropic.models.beta.organization.workspaces.members.MemberAddParams;
530 import com.anthropic.models.organization.workspaces.NoBillingWorkspaceRole;
531 import com.anthropic.models.organization.workspaces.members.MemberAddParams;
534532 
535533 void main() {
536534 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 535
537535 
538536 var params = MemberAddParams.builder()
539537 .userId("user_01XyDMpzjS89pFZXqSFUBDr6")
540 .workspaceRole(BetaNoBillingWorkspaceRole.WORKSPACE_DEVELOPER)
538 .workspaceRole(NoBillingWorkspaceRole.WORKSPACE_DEVELOPER)
541539 .build();
542 var member = client.beta().organization().workspaces().members()
540 var member = client.organization().workspaces().members()
543541 .add("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ", params);
544542 
545543 IO.println("user_id: " + member.userId());
from line 546
548546 ```
549547 
550548 ```php PHP
551 use Anthropic\Beta\Organization\Workspaces\NoBillingWorkspaceRole;
549 use Anthropic\Organization\Workspaces\NoBillingWorkspaceRole;
552550 // ...
553551 
554552 $client = new Client();
555553 
556 $member = $client->beta->organization->workspaces->members->add(
554 $member = $client->organization->workspaces->members->add(
557555 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
558556 userID: 'user_01XyDMpzjS89pFZXqSFUBDr6',
559557 workspaceRole: NoBillingWorkspaceRole::WORKSPACE_DEVELOPER,
from line 565
567565 client = Anthropic::Client.new
568566 
569567 workspace_id = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
570 member = client.beta.organization.workspaces.members.add(
568 member = client.organization.workspaces.members.add(
571569 workspace_id,
572570 user_id: "user_01XyDMpzjS89pFZXqSFUBDr6",
573571 workspace_role: :workspace_developer
from line 588
590588 ```
591589 
592590 ```bash CLI
593 ant beta:organization:workspaces:members update \
591 ant organization:workspaces:members update \
594592 --user-id user_01XyDMpzjS89pFZXqSFUBDr6 \
595593 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ \
596594 --workspace-role workspace_admin
from line 597
599597 ```python Python
600598 client = anthropic.Anthropic()
601599 
602 member = client.beta.organization.workspaces.members.update(
600 member = client.organization.workspaces.members.update(
603601 "user_01XyDMpzjS89pFZXqSFUBDr6",
604602 workspace_id="wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
605603 workspace_role="workspace_admin",
from line 610
612610 ```typescript TypeScript
613611 const client = new Anthropic();
614612 
615 const member = await client.beta.organization.workspaces.members.update(
613 const member = await client.organization.workspaces.members.update(
616614 "user_01XyDMpzjS89pFZXqSFUBDr6",
617615 {
618616 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
from line 623
625623 ```
626624 
627625 ```csharp C#
628 using Anthropic.Models.Beta.Organization.Workspaces;
626 using Anthropic.Models.Organization.Workspaces;
629627 
630628 AnthropicClient client = new();
631629 
632 var member = await client.Beta.Organization.Workspaces.Members.Update(
630 var member = await client.Organization.Workspaces.Members.Update(
633631 "user_01XyDMpzjS89pFZXqSFUBDr6",
634632 new()
635633 {
636634 WorkspaceID = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
637 WorkspaceRole = BetaWorkspaceRole.WorkspaceAdmin
635 WorkspaceRole = WorkspaceRole.WorkspaceAdmin
638636 }
639637 );
640638 
from line 643
645643 ```go Go
646644 client := anthropic.NewClient()
647645 
648 member, err := client.Beta.Organization.Workspaces.Members.Update(
646 member, err := client.Organization.Workspaces.Members.Update(
649647 context.Background(),
650648 "user_01XyDMpzjS89pFZXqSFUBDr6",
651 anthropic.BetaOrganizationWorkspaceMemberUpdateParams{
649 anthropic.OrganizationWorkspaceMemberUpdateParams{
652650 WorkspaceID: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
653 WorkspaceRole: anthropic.BetaWorkspaceRoleWorkspaceAdmin,
651 WorkspaceRole: anthropic.WorkspaceRoleWorkspaceAdmin,
654652 },
655653 )
656654 if err != nil {
from line 660
662660 ```
663661 
664662 ```java Java
665 import com.anthropic.models.beta.organization.workspaces.BetaWorkspaceRole;
666 import com.anthropic.models.beta.organization.workspaces.members.MemberUpdateParams;
663 import com.anthropic.models.organization.workspaces.WorkspaceRole;
664 import com.anthropic.models.organization.workspaces.members.MemberUpdateParams;
667665 
668666 void main() {
669667 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 668
670668 
671669 var params = MemberUpdateParams.builder()
672670 .workspaceId("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
673 .workspaceRole(BetaWorkspaceRole.WORKSPACE_ADMIN)
671 .workspaceRole(WorkspaceRole.WORKSPACE_ADMIN)
674672 .build();
675 var member = client.beta().organization().workspaces().members()
673 var member = client.organization().workspaces().members()
676674 .update("user_01XyDMpzjS89pFZXqSFUBDr6", params);
677675 
678676 IO.println("user_id: " + member.userId());
from line 679
681679 ```
682680 
683681 ```php PHP
684 use Anthropic\Beta\Organization\Workspaces\WorkspaceRole;
682 use Anthropic\Organization\Workspaces\WorkspaceRole;
685683 // ...
686684 
687685 $client = new Client();
688686 
689 $member = $client->beta->organization->workspaces->members->update(
687 $member = $client->organization->workspaces->members->update(
690688 userID: 'user_01XyDMpzjS89pFZXqSFUBDr6',
691689 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
692690 workspaceRole: WorkspaceRole::WORKSPACE_ADMIN,
from line 698
700698 client = Anthropic::Client.new
701699 
702700 user_id = "user_01XyDMpzjS89pFZXqSFUBDr6"
703 member = client.beta.organization.workspaces.members.update(
701 member = client.organization.workspaces.members.update(
704702 user_id,
705703 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
706704 workspace_role: :workspace_admin
from line 719
721719 ```
722720 
723721 ```bash CLI
724 ant beta:organization:workspaces:members remove \
722 ant organization:workspaces:members remove \
725723 --user-id user_01XyDMpzjS89pFZXqSFUBDr6 \
726724 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ
727725 ```
from line 727
729727 ```python Python
730728 client = anthropic.Anthropic()
731729 
732 removed_member = client.beta.organization.workspaces.members.remove(
730 removed_member = client.organization.workspaces.members.remove(
733731 "user_01XyDMpzjS89pFZXqSFUBDr6",
734732 workspace_id="wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
735733 )
from line 738
740738 ```typescript TypeScript
741739 const client = new Anthropic();
742740 
743 const removedMember = await client.beta.organization.workspaces.members.remove(
741 const removedMember = await client.organization.workspaces.members.remove(
744742 "user_01XyDMpzjS89pFZXqSFUBDr6",
745743 { workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ" }
746744 );
from line 749
751749 ```csharp C#
752750 AnthropicClient client = new();
753751 
754 var removedMember = await client.Beta.Organization.Workspaces.Members.Remove(
752 var removedMember = await client.Organization.Workspaces.Members.Remove(
755753 "user_01XyDMpzjS89pFZXqSFUBDr6",
756754 new() { WorkspaceID = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ" }
757755 );
from line 760
762760 ```go Go
763761 client := anthropic.NewClient()
764762 
765 removedMember, err := client.Beta.Organization.Workspaces.Members.Remove(
763 removedMember, err := client.Organization.Workspaces.Members.Remove(
766764 context.Background(),
767765 "user_01XyDMpzjS89pFZXqSFUBDr6",
768 anthropic.BetaOrganizationWorkspaceMemberRemoveParams{
766 anthropic.OrganizationWorkspaceMemberRemoveParams{
769767 WorkspaceID: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
770768 },
771769 )
from line 775
777775 ```
778776 
779777 ```java Java
780 import com.anthropic.models.beta.organization.workspaces.members.MemberRemoveParams;
778 import com.anthropic.models.organization.workspaces.members.MemberRemoveParams;
781779 
782780 void main() {
783781 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
from line 783
785783 var params = MemberRemoveParams.builder()
786784 .workspaceId("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
787785 .build();
788 var removedMember = client.beta().organization().workspaces().members()
786 var removedMember = client.organization().workspaces().members()
789787 .remove("user_01XyDMpzjS89pFZXqSFUBDr6", params);
790788 
791789 IO.println("user_id: " + removedMember.userId());
from line 793
795793 ```php PHP
796794 $client = new Client();
797795 
798 $removedMember = $client->beta->organization->workspaces->members->remove(
796 $removedMember = $client->organization->workspaces->members->remove(
799797 userID: 'user_01XyDMpzjS89pFZXqSFUBDr6',
800798 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
801799 );
from line 805
807805 client = Anthropic::Client.new
808806 
809807 user_id = "user_01XyDMpzjS89pFZXqSFUBDr6"
810 removed_member = client.beta.organization.workspaces.members.remove(
808 removed_member = client.organization.workspaces.members.remove(
811809 user_id,
812810 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
813811 )
from line 814
816814 ```
817815</CodeGroup>
818816 
819For complete parameter details, see the [Workspace Members API reference](https://platform.claude.com/docs/en/api/beta/organization/workspaces/members/retrieve).
817For complete parameter details, see the [Workspace Members API reference](https://platform.claude.com/docs/en/api/organization/workspaces/members/retrieve).
820818 
821819## API keys and resource scoping
822820 
from line 834
836834* **[MCP tunnels](https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/overview)** are managed with a `workspace:manage_tunnels` OAuth token obtained through [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation), not an API key. Tunnels are created in a workspace, and the Console **MCP tunnels** list and the Managed Agent server picker show tunnels in the current workspace only; the cap of 10 active tunnels applies organization-wide. Tunnel management requires a role with tunnel management permissions; organization developers can view but not change them.
837835* **Workspaces** themselves and **organization members** are managed at the organization level through the [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api), using an Admin API key, an `org:admin` OAuth token, or a personal or service account key that isn't scoped to a specific workspace.
838836 
839To look up your organization's workspace IDs, call the [List Workspaces](https://platform.claude.com/docs/en/api/beta/organization/workspaces/list) endpoint (pass `include_default=true` to include the Default Workspace) or find them in the [Claude Console](https://platform.claude.com/settings/workspaces).
837To look up your organization's workspace IDs, call the [List Workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) endpoint (pass `include_default=true` to include the Default Workspace) or find them in the [Claude Console](https://platform.claude.com/settings/workspaces).
840838 
841839<Note>
842840 [Prompt caches](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) are also isolated per workspace on the Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). On Amazon Bedrock and Google Cloud, prompt caches are isolated per organization.
from line 1006
10081006 
10091007* Confirm which workspace's usage, cost, and [rate limits](https://platform.claude.com/docs/en/api/rate-limits) the request counted toward
10101008* Match it against the `workspace_id` field in [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api) reports and on [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) objects such as API keys (both report `null` for the Default Workspace, as API keys also do for all-workspaces keys; an API key's `scope` field tells the two apart and, for a key bound to one workspace, carries that workspace's real ID)
1011* Check whether it's your Default Workspace's ID by passing it to [Get Workspace](https://platform.claude.com/docs/en/api/beta/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/beta/organization/workspaces/list) omits it unless you pass `include_default=true`
1009* 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`
10121010* 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
10131011 
10141012## Workspace limits
from line 1097
10991097 
11001098<AccordionGroup>
11011099 <Accordion title="What's the Default Workspace?">
1102 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/beta/organization/workspaces/retrieve) and [Update Workspace](https://platform.claude.com/docs/en/api/beta/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/beta/organization/workspaces/list) results only when you pass `include_default=true`, and API keys, usage reports, and cost reports that belong to it show `null` for `workspace_id`, as do all-workspaces API keys; an API key's `scope` field tells the two apart and, for a key that belongs to the Default Workspace, carries its real ID.
1100 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 API keys, usage reports, and cost reports that belong to it show `null` for `workspace_id`, as do all-workspaces API keys; an API key's `scope` field tells the two apart and, for a key that belongs to the Default Workspace, carries its real ID.
11031101 </Accordion>
11041102 
11051103 <Accordion title="What's the Claude Code workspace?">
from line 1136
11381136## See also
11391137 
11401138* [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api)
1141* [Admin API reference](https://platform.claude.com/docs/en/api/beta/organization)
1139* [Admin API reference](https://platform.claude.com/docs/en/api/organization)
11421140* [Rate limits](https://platform.claude.com/docs/en/api/rate-limits)
11431141* [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api)
11441142 
Feedback