workspaces changedmanage-claude/workspaces
Nearest release: v2.1.247, published under an hour 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+669added
Lines−43removed
From line
140
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits23to this page, all time
The whole hunk
from line 140, old and new numbered
/
The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.
from line 140
140140 Admin API endpoints require an Admin API key (starting with `sk-ant-admin...`) that differs from standard API keys. See [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys) for how to provision one.
141141</Note>
142142
143```bash cURL
144# Create a workspace
145curl -X POST "https://api.anthropic.com/v1/organizations/workspaces" \
146 -H "anthropic-version: 2023-06-01" \
147 -H "content-type: application/json" \
148 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
149 -d '{"name": "Production"}'
150
151# List workspaces
152curl "https://api.anthropic.com/v1/organizations/workspaces?limit=10&include_archived=false" \
153 -H "anthropic-version: 2023-06-01" \
154 -H "x-api-key: $ANTHROPIC_ADMIN_KEY"
155
156# Archive a workspace
157curl -X POST "https://api.anthropic.com/v1/organizations/workspaces/{workspace_id}/archive" \
158 -H "anthropic-version: 2023-06-01" \
159 -H "x-api-key: $ANTHROPIC_ADMIN_KEY"
160```
143The 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.
144
145Create a workspace:
146
147<CodeGroup>
148 ```bash cURL
149 curl -X POST "https://api.anthropic.com/v1/organizations/workspaces" \
150 -H "x-api-key: $ANTHROPIC_API_KEY" \
151 -H "anthropic-version: 2023-06-01" \
152 -H "content-type: application/json" \
153 -d '{"name": "Production"}'
154 ```
155
156 ```bash CLI
157 ant beta:organization:workspaces create --name Production
158 ```
159
160 ```python Python
161 client = anthropic.Anthropic()
162
163 workspace = client.beta.organization.workspaces.create(name="Production")
164
165 print(f"id: {workspace.id}")
166 print(f"name: {workspace.name}")
167 ```
168
169 ```typescript TypeScript
170 const client = new Anthropic();
171
172 const workspace = await client.beta.organization.workspaces.create({ name: "Production" });
173
174 console.log(`id: ${workspace.id}`);
175 console.log(`name: ${workspace.name}`);
176 ```
177
178 ```csharp C#
179 AnthropicClient client = new();
180
181 var workspace = await client.Beta.Organization.Workspaces.Create(new()
182 {
183 Name = "Production"
184 });
185
186 Console.WriteLine($"id: {workspace.ID}");
187 Console.WriteLine($"name: {workspace.Name}");
188 ```
189
190 ```go Go
191 client := anthropic.NewClient()
192
193 workspace, err := client.Beta.Organization.Workspaces.New(context.Background(), anthropic.BetaOrganizationWorkspaceNewParams{
194 Name: "Production",
195 })
196 if err != nil {
197 log.Fatal(err)
198 }
199
200 fmt.Printf("id: %s\n", workspace.ID)
201 fmt.Printf("name: %s\n", workspace.Name)
202 ```
203
204 ```java Java
205 import com.anthropic.models.beta.organization.workspaces.WorkspaceCreateParams;
206
207 void main() {
208 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
209
210 var params = WorkspaceCreateParams.builder()
211 .name("Production")
212 .build();
213 var workspace = client.beta().organization().workspaces().create(params);
214
215 IO.println("id: " + workspace.id());
216 IO.println("name: " + workspace.name());
217 }
218 ```
219
220 ```php PHP
221 $client = new Client();
222
223 $workspace = $client->beta->organization->workspaces->create(
224 name: 'Production',
225 );
226
227 echo "id: {$workspace->id}\n";
228 echo "name: {$workspace->name}\n";
229 ```
230
231 ```ruby Ruby
232 client = Anthropic::Client.new
233
234 workspace = client.beta.organization.workspaces.create(name: "Production")
235
236 puts "id: #{workspace.id}"
237 puts "name: #{workspace.name}"
238 ```
239</CodeGroup>
240
241List workspaces:
242
243<CodeGroup>
244 ```bash cURL
245 curl "https://api.anthropic.com/v1/organizations/workspaces?limit=10&include_archived=false" \
246 -H "x-api-key: $ANTHROPIC_API_KEY" \
247 -H "anthropic-version: 2023-06-01"
248 ```
249
250 ```bash CLI
251 ant beta:organization:workspaces list --limit 10 --include-archived=false
252 ```
253
254 ```python Python
255 client = anthropic.Anthropic()
256
257 workspaces = client.beta.organization.workspaces.list(limit=10, include_archived=False)
258
259 for workspace in workspaces:
260 print(f"{workspace.id}: {workspace.name}")
261 ```
262
263 ```typescript TypeScript
264 const client = new Anthropic();
265
266 const workspaces = await client.beta.organization.workspaces.list({
267 limit: 10,
268 include_archived: false
269 });
270
271 for await (const workspace of workspaces) {
272 console.log(`${workspace.id}: ${workspace.name}`);
273 }
274 ```
275
276 ```csharp C#
277 AnthropicClient client = new();
278
279 var workspaces = await client.Beta.Organization.Workspaces.List(new()
280 {
281 Limit = 10,
282 IncludeArchived = false
283 });
284
285 await foreach (var workspace in workspaces.Paginate())
286 {
287 Console.WriteLine($"{workspace.ID}: {workspace.Name}");
288 }
289 ```
290
291 ```go Go
292 client := anthropic.NewClient()
293
294 workspaces := client.Beta.Organization.Workspaces.ListAutoPaging(context.Background(), anthropic.BetaOrganizationWorkspaceListParams{
295 Limit: anthropic.Int(10),
296 IncludeArchived: anthropic.Bool(false),
297 })
298
299 for workspaces.Next() {
300 workspace := workspaces.Current()
301 fmt.Printf("%s: %s\n", workspace.ID, workspace.Name)
302 }
303 if err := workspaces.Err(); err != nil {
304 log.Fatal(err)
305 }
306 ```
307
308 ```java Java
309 import com.anthropic.models.beta.organization.workspaces.WorkspaceListParams;
310
311 void main() {
312 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
313
314 var params = WorkspaceListParams.builder()
315 .limit(10)
316 .includeArchived(false)
317 .build();
318 var workspaces = client.beta().organization().workspaces().list(params);
319
320 for (var workspace : workspaces.autoPager()) {
321 IO.println(workspace.id() + ": " + workspace.name());
322 }
323 }
324 ```
325
326 ```php PHP
327 $client = new Client();
328
329 $workspaces = $client->beta->organization->workspaces->list(
330 limit: 10,
331 includeArchived: false,
332 );
333
334 foreach ($workspaces->getItems() as $workspace) {
335 echo "{$workspace->id}: {$workspace->name}\n";
336 }
337 ```
338
339 ```ruby Ruby
340 client = Anthropic::Client.new
341
342 workspaces = client.beta.organization.workspaces.list(limit: 10, include_archived: false)
343
344 workspaces.data.each do |workspace|
345 puts "#{workspace.id}: #{workspace.name}"
346 end
347 ```
348</CodeGroup>
349
350Archive a workspace:
351
352<CodeGroup>
353 ```bash cURL
354 curl -X POST "https://api.anthropic.com/v1/organizations/workspaces/wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ/archive" \
355 -H "x-api-key: $ANTHROPIC_API_KEY" \
356 -H "anthropic-version: 2023-06-01"
357 ```
358
359 ```bash CLI
360 ant beta:organization:workspaces archive --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ
361 ```
362
363 ```python Python
364 client = anthropic.Anthropic()
365
366 workspace = client.beta.organization.workspaces.archive(
367 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
368 )
369
370 print(f"id: {workspace.id}")
371 print(f"archived_at: {workspace.archived_at}")
372 ```
373
374 ```typescript TypeScript
375 const client = new Anthropic();
376
377 const workspace = await client.beta.organization.workspaces.archive(
378 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
379 );
380
381 console.log(`id: ${workspace.id}`);
382 console.log(`archived_at: ${workspace.archived_at}`);
383 ```
384
385 ```csharp C#
386 AnthropicClient client = new();
387
388 var workspace = await client.Beta.Organization.Workspaces.Archive(
389 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
390 );
391
392 Console.WriteLine($"id: {workspace.ID}");
393 Console.WriteLine($"archived_at: {workspace.ArchivedAt:O}");
394 ```
395
396 ```go Go
397 client := anthropic.NewClient()
398
399 workspace, err := client.Beta.Organization.Workspaces.Archive(context.Background(), "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
400 if err != nil {
401 log.Fatal(err)
402 }
403
404 fmt.Printf("id: %s\n", workspace.ID)
405 fmt.Printf("archived_at: %s\n", workspace.ArchivedAt)
406 ```
407
408 ```java Java
409 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
410
411 var workspace = client.beta().organization().workspaces()
412 .archive("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ");
413
414 IO.println("id: " + workspace.id());
415 IO.println("archived_at: " + workspace.archivedAt().orElseThrow());
416 ```
417
418 ```php PHP
419 $client = new Client();
420
421 $workspace = $client->beta->organization->workspaces->archive(
422 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
423 );
424
425 echo "id: {$workspace->id}\n";
426 echo "archived_at: {$workspace->archivedAt?->format(DATE_ATOM)}\n";
427 ```
428
429 ```ruby Ruby
430 client = Anthropic::Client.new
431
432 workspace_id = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
433 workspace = client.beta.organization.workspaces.archive(workspace_id)
434
435 puts "id: #{workspace.id}"
436 puts "archived_at: #{workspace.archived_at}"
437 ```
438</CodeGroup>
161439
162440For complete parameter details and response schemas, see the [Workspaces API reference](https://platform.claude.com/docs/en/api/admin/workspaces/retrieve).
163441
164442### Managing workspace members
165443
166Add, update, or remove members from a workspace:
167
168```bash cURL
169# Add a member to a workspace
170curl -X POST "https://api.anthropic.com/v1/organizations/workspaces/{workspace_id}/members" \
171 -H "anthropic-version: 2023-06-01" \
172 -H "content-type: application/json" \
173 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
174 -d '{
175 "user_id": "user_xxx",
176 "workspace_role": "workspace_developer"
177 }'
178
179# Update a member's role
180curl -X POST "https://api.anthropic.com/v1/organizations/workspaces/{workspace_id}/members/{user_id}" \
181 -H "anthropic-version: 2023-06-01" \
182 -H "content-type: application/json" \
183 -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
184 -d '{"workspace_role": "workspace_admin"}'
185
186# Remove a member from a workspace
187curl -X DELETE "https://api.anthropic.com/v1/organizations/workspaces/{workspace_id}/members/{user_id}" \
188 -H "anthropic-version: 2023-06-01" \
189 -H "x-api-key: $ANTHROPIC_ADMIN_KEY"
190```
444Add a member to a workspace:
445
446<CodeGroup>
447 ```bash cURL
448 curl -X POST "https://api.anthropic.com/v1/organizations/workspaces/wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ/members" \
449 -H "x-api-key: $ANTHROPIC_API_KEY" \
450 -H "anthropic-version: 2023-06-01" \
451 -H "content-type: application/json" \
452 -d '{
453 "user_id": "user_01XyDMpzjS89pFZXqSFUBDr6",
454 "workspace_role": "workspace_developer"
455 }'
456 ```
457
458 ```bash CLI
459 ant beta:organization:workspaces:members add \
460 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ \
461 --user-id user_01XyDMpzjS89pFZXqSFUBDr6 \
462 --workspace-role workspace_developer
463 ```
464
465 ```python Python
466 client = anthropic.Anthropic()
467
468 member = client.beta.organization.workspaces.members.add(
469 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
470 user_id="user_01XyDMpzjS89pFZXqSFUBDr6",
471 workspace_role="workspace_developer",
472 )
473
474 print(f"user_id: {member.user_id}")
475 print(f"workspace_role: {member.workspace_role}")
476 ```
477
478 ```typescript TypeScript
479 const client = new Anthropic();
480
481 const member = await client.beta.organization.workspaces.members.add(
482 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
483 {
484 user_id: "user_01XyDMpzjS89pFZXqSFUBDr6",
485 workspace_role: "workspace_developer"
486 }
487 );
488
489 console.log(`user_id: ${member.user_id}`);
490 console.log(`workspace_role: ${member.workspace_role}`);
491 ```
492
493 ```csharp C#
494 using Anthropic.Models.Beta.Organization.Workspaces;
495
496 AnthropicClient client = new();
497
498 var member = await client.Beta.Organization.Workspaces.Members.Add(
499 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
500 new()
501 {
502 UserID = "user_01XyDMpzjS89pFZXqSFUBDr6",
503 WorkspaceRole = BetaNoBillingWorkspaceRole.WorkspaceDeveloper
504 }
505 );
506
507 Console.WriteLine($"user_id: {member.UserID}");
508 Console.WriteLine($"workspace_role: {member.WorkspaceRole.Raw()}");
509 ```
510
511 ```go Go
512 client := anthropic.NewClient()
513
514 member, err := client.Beta.Organization.Workspaces.Members.Add(
515 context.Background(),
516 "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
517 anthropic.BetaOrganizationWorkspaceMemberAddParams{
518 UserID: "user_01XyDMpzjS89pFZXqSFUBDr6",
519 WorkspaceRole: anthropic.BetaNoBillingWorkspaceRoleWorkspaceDeveloper,
520 },
521 )
522 if err != nil {
523 log.Fatal(err)
524 }
525
526 fmt.Printf("user_id: %s\n", member.UserID)
527 fmt.Printf("workspace_role: %s\n", member.WorkspaceRole)
528 ```
529
530 ```java Java
531 import com.anthropic.models.beta.organization.workspaces.BetaNoBillingWorkspaceRole;
532 import com.anthropic.models.beta.organization.workspaces.members.MemberAddParams;
533
534 void main() {
535 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
536
537 var params = MemberAddParams.builder()
538 .userId("user_01XyDMpzjS89pFZXqSFUBDr6")
539 .workspaceRole(BetaNoBillingWorkspaceRole.WORKSPACE_DEVELOPER)
540 .build();
541 var member = client.beta().organization().workspaces().members()
542 .add("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ", params);
543
544 IO.println("user_id: " + member.userId());
545 IO.println("workspace_role: " + member.workspaceRole().asString());
546 }
547 ```
548
549 ```php PHP
550 use Anthropic\Beta\Organization\Workspaces\NoBillingWorkspaceRole;
551 // ...
552
553 $client = new Client();
554
555 $member = $client->beta->organization->workspaces->members->add(
556 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
557 userID: 'user_01XyDMpzjS89pFZXqSFUBDr6',
558 workspaceRole: NoBillingWorkspaceRole::WORKSPACE_DEVELOPER,
559 );
560
561 echo "user_id: {$member->userID}\n";
562 echo "workspace_role: {$member->workspaceRole}\n";
563 ```
564
565 ```ruby Ruby
566 client = Anthropic::Client.new
567
568 workspace_id = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
569 member = client.beta.organization.workspaces.members.add(
570 workspace_id,
571 user_id: "user_01XyDMpzjS89pFZXqSFUBDr6",
572 workspace_role: :workspace_developer
573 )
574
575 puts "user_id: #{member.user_id}"
576 puts "workspace_role: #{member.workspace_role}"
577 ```
578</CodeGroup>
579
580Update a member's role:
581
582<CodeGroup>
583 ```bash cURL
584 curl -X POST "https://api.anthropic.com/v1/organizations/workspaces/wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ/members/user_01XyDMpzjS89pFZXqSFUBDr6" \
585 -H "x-api-key: $ANTHROPIC_API_KEY" \
586 -H "anthropic-version: 2023-06-01" \
587 -H "content-type: application/json" \
588 -d '{"workspace_role": "workspace_admin"}'
589 ```
590
591 ```bash CLI
592 ant beta:organization:workspaces:members update \
593 --user-id user_01XyDMpzjS89pFZXqSFUBDr6 \
594 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ \
595 --workspace-role workspace_admin
596 ```
597
598 ```python Python
599 client = anthropic.Anthropic()
600
601 member = client.beta.organization.workspaces.members.update(
602 "user_01XyDMpzjS89pFZXqSFUBDr6",
603 workspace_id="wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
604 workspace_role="workspace_admin",
605 )
606
607 print(f"user_id: {member.user_id}")
608 print(f"workspace_role: {member.workspace_role}")
609 ```
610
611 ```typescript TypeScript
612 const client = new Anthropic();
613
614 const member = await client.beta.organization.workspaces.members.update(
615 "user_01XyDMpzjS89pFZXqSFUBDr6",
616 {
617 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
618 workspace_role: "workspace_admin"
619 }
620 );
621
622 console.log(`user_id: ${member.user_id}`);
623 console.log(`workspace_role: ${member.workspace_role}`);
624 ```
625
626 ```csharp C#
627 using Anthropic.Models.Beta.Organization.Workspaces;
628
629 AnthropicClient client = new();
630
631 var member = await client.Beta.Organization.Workspaces.Members.Update(
632 "user_01XyDMpzjS89pFZXqSFUBDr6",
633 new()
634 {
635 WorkspaceID = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
636 WorkspaceRole = BetaWorkspaceRole.WorkspaceAdmin
637 }
638 );
639
640 Console.WriteLine($"user_id: {member.UserID}");
641 Console.WriteLine($"workspace_role: {member.WorkspaceRole.Raw()}");
642 ```
643
644 ```go Go
645 client := anthropic.NewClient()
646
647 member, err := client.Beta.Organization.Workspaces.Members.Update(
648 context.Background(),
649 "user_01XyDMpzjS89pFZXqSFUBDr6",
650 anthropic.BetaOrganizationWorkspaceMemberUpdateParams{
651 WorkspaceID: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
652 WorkspaceRole: anthropic.BetaWorkspaceRoleWorkspaceAdmin,
653 },
654 )
655 if err != nil {
656 log.Fatal(err)
657 }
658
659 fmt.Printf("user_id: %s\n", member.UserID)
660 fmt.Printf("workspace_role: %s\n", member.WorkspaceRole)
661 ```
662
663 ```java Java
664 import com.anthropic.models.beta.organization.workspaces.BetaWorkspaceRole;
665 import com.anthropic.models.beta.organization.workspaces.members.MemberUpdateParams;
666
667 void main() {
668 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
669
670 var params = MemberUpdateParams.builder()
671 .workspaceId("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
672 .workspaceRole(BetaWorkspaceRole.WORKSPACE_ADMIN)
673 .build();
674 var member = client.beta().organization().workspaces().members()
675 .update("user_01XyDMpzjS89pFZXqSFUBDr6", params);
676
677 IO.println("user_id: " + member.userId());
678 IO.println("workspace_role: " + member.workspaceRole().asString());
679 }
680 ```
681
682 ```php PHP
683 use Anthropic\Beta\Organization\Workspaces\WorkspaceRole;
684 // ...
685
686 $client = new Client();
687
688 $member = $client->beta->organization->workspaces->members->update(
689 userID: 'user_01XyDMpzjS89pFZXqSFUBDr6',
690 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
691 workspaceRole: WorkspaceRole::WORKSPACE_ADMIN,
692 );
693
694 echo "user_id: {$member->userID}\n";
695 echo "workspace_role: {$member->workspaceRole}\n";
696 ```
697
698 ```ruby Ruby
699 client = Anthropic::Client.new
700
701 user_id = "user_01XyDMpzjS89pFZXqSFUBDr6"
702 member = client.beta.organization.workspaces.members.update(
703 user_id,
704 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
705 workspace_role: :workspace_admin
706 )
707
708 puts "user_id: #{member.user_id}"
709 puts "workspace_role: #{member.workspace_role}"
710 ```
711</CodeGroup>
712
713Remove a member from a workspace:
714
715<CodeGroup>
716 ```bash cURL
717 curl -X DELETE "https://api.anthropic.com/v1/organizations/workspaces/wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ/members/user_01XyDMpzjS89pFZXqSFUBDr6" \
718 -H "x-api-key: $ANTHROPIC_API_KEY" \
719 -H "anthropic-version: 2023-06-01"
720 ```
721
722 ```bash CLI
723 ant beta:organization:workspaces:members remove \
724 --user-id user_01XyDMpzjS89pFZXqSFUBDr6 \
725 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ
726 ```
727
728 ```python Python
729 client = anthropic.Anthropic()
730
731 removed_member = client.beta.organization.workspaces.members.remove(
732 "user_01XyDMpzjS89pFZXqSFUBDr6",
733 workspace_id="wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
734 )
735
736 print(f"user_id: {removed_member.user_id}")
737 ```
738
739 ```typescript TypeScript
740 const client = new Anthropic();
741
742 const removedMember = await client.beta.organization.workspaces.members.remove(
743 "user_01XyDMpzjS89pFZXqSFUBDr6",
744 { workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ" }
745 );
746
747 console.log(`user_id: ${removedMember.user_id}`);
748 ```
749
750 ```csharp C#
751 AnthropicClient client = new();
752
753 var removedMember = await client.Beta.Organization.Workspaces.Members.Remove(
754 "user_01XyDMpzjS89pFZXqSFUBDr6",
755 new() { WorkspaceID = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ" }
756 );
757
758 Console.WriteLine($"user_id: {removedMember.UserID}");
759 ```
760
761 ```go Go
762 client := anthropic.NewClient()
763
764 removedMember, err := client.Beta.Organization.Workspaces.Members.Remove(
765 context.Background(),
766 "user_01XyDMpzjS89pFZXqSFUBDr6",
767 anthropic.BetaOrganizationWorkspaceMemberRemoveParams{
768 WorkspaceID: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
769 },
770 )
771 if err != nil {
772 log.Fatal(err)
773 }
774
775 fmt.Printf("user_id: %s\n", removedMember.UserID)
776 ```
777
778 ```java Java
779 import com.anthropic.models.beta.organization.workspaces.members.MemberRemoveParams;
780
781 void main() {
782 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
783
784 var params = MemberRemoveParams.builder()
785 .workspaceId("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
786 .build();
787 var removedMember = client.beta().organization().workspaces().members()
788 .remove("user_01XyDMpzjS89pFZXqSFUBDr6", params);
789
790 IO.println("user_id: " + removedMember.userId());
791 }
792 ```
793
794 ```php PHP
795 $client = new Client();
796
797 $removedMember = $client->beta->organization->workspaces->members->remove(
798 userID: 'user_01XyDMpzjS89pFZXqSFUBDr6',
799 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
800 );
801
802 echo "user_id: {$removedMember->userID}\n";
803 ```
804
805 ```ruby Ruby
806 client = Anthropic::Client.new
807
808 user_id = "user_01XyDMpzjS89pFZXqSFUBDr6"
809 removed_member = client.beta.organization.workspaces.members.remove(
810 user_id,
811 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
812 )
813
814 puts "user_id: #{removed_member.user_id}"
815 ```
816</CodeGroup>
191817
192818For complete parameter details, see the [Workspace Members API reference](https://platform.claude.com/docs/en/api/admin/workspaces/members/retrieve).
193819
194820
No line in this hunk matches that.