from line 324
324324
325325 - `"user"`
326326
327### Errors
328
329Any method can also return the general [HTTP errors](https://platform.claude.com/docs/en/api/errors?sdk_languages=http).
330
331Each code below is the value of `error.details.error_code` in the response body.
332
333- `sandbox_egress_restricted` (HTTP status 403)
334
335 The request came from a Claude sandbox with restricted network access, which is not allowed to make this change. Send it from outside the sandbox, or from a sandbox with unrestricted network access.
336
327337### Example
328338
329339```bash
from line 393
383393
384394 ID of the User.
385395
396### Errors
397
398Any method can also return the general [HTTP errors](https://platform.claude.com/docs/en/api/errors?sdk_languages=http).
399
400Each code below is the value of `error.details.error_code` in the response body.
401
402- `cannot_remove_last_member` (HTTP status 400)
403
404 The user is the organization's only member. Add another member before removing this one.
405
406- `sandbox_egress_restricted` (HTTP status 403)
407
408 The request came from a Claude sandbox with restricted network access, which is not allowed to make this change. Send it from outside the sandbox, or from a sandbox with unrestricted network access.
409
410- `concurrent_membership_change` (HTTP status 409)
411
412 Another change to the organization's members is in progress. Retry the request once it completes.
413
386414### Example
387415
388416```bash
from line 647
619647
620648 - `"user"`
621649
650### Errors
651
652Any method can also return the general [HTTP errors](https://platform.claude.com/docs/en/api/errors?sdk_languages=http).
653
654Each code below is the value of `error.details.error_code` in the response body.
655
656- `cannot_sign_out_primary_owner` (HTTP status 400)
657
658 The member is the organization's primary owner, whom no API key or token can sign out.
659
660- `cannot_sign_out_self` (HTTP status 400)
661
662 The member is the user the API key or token belongs to.
663
664- `organization_not_enrolled_in_beta` (HTTP status 400)
665
666 The beta that the endpoint requires is not enabled for the organization. The message names the beta value.
667
668- `cannot_sign_out_managed_member` (HTTP status 403)
669
670 The member has the `managed` role, and this API key or token cannot sign them out. The error message says which keys and tokens can.
671
672- `cannot_sign_out_membership_admin` (HTTP status 403)
673
674 The member is a membership admin, and the person the API key or token belongs to is not allowed to sign out membership admins.
675
676- `cannot_sign_out_owner` (HTTP status 403)
677
678 The member is an owner or has owner permissions, and this API key or token cannot sign them out. In a Claude Enterprise organization, an API key with the `write:members` scope can.
679
680- `cannot_sign_out_privileged_member` (HTTP status 403)
681
682 This OAuth token cannot sign out a membership admin or a member whose roles grant owner, user management, or identity and access management.
683
684- `sandbox_egress_restricted` (HTTP status 403)
685
686 The request came from a Claude sandbox with restricted network access, which is not allowed to make this change. Send it from outside the sandbox, or from a sandbox with unrestricted network access.
687
622688### Example
623689
624690```bash
from line 714
648714
649715- `BetaCannotSignOutManagedMemberErrorDetails object`
650716
651 The member has the `managed` role, and this API key or token cannot sign them out. The error message says which keys and tokens can.
652
653717 - `error_code: "cannot_sign_out_managed_member"`
654718
655719### Beta Cannot Sign Out Membership Admin Error Details
from line 720
656720
657721- `BetaCannotSignOutMembershipAdminErrorDetails object`
658722
659 The member is a membership admin, and the person the API key or token belongs to is not allowed to sign out membership admins.
660
661723 - `error_code: "cannot_sign_out_membership_admin"`
662724
663725### Beta Cannot Sign Out Owner Error Details
from line 726
664726
665727- `BetaCannotSignOutOwnerErrorDetails object`
666728
667 The member is an owner or has owner permissions, and this API key or token cannot sign them out. In a Claude Enterprise organization, an API key with the `write:members` scope can.
668
669729 - `error_code: "cannot_sign_out_owner"`
670730
671731### Beta Cannot Sign Out Primary Owner Error Details
from line 732
672732
673733- `BetaCannotSignOutPrimaryOwnerErrorDetails object`
674734
675 The member is the organization's primary owner, whom no API key or token can sign out.
676
677735 - `error_code: "cannot_sign_out_primary_owner"`
678736
679737### Beta Cannot Sign Out Privileged Member Error Details
from line 738
680738
681739- `BetaCannotSignOutPrivilegedMemberErrorDetails object`
682740
683 This OAuth token cannot sign out a membership admin or a member whose roles grant owner, user management, or identity and access management.
684
685741 - `error_code: "cannot_sign_out_privileged_member"`
686742
687743### Beta Cannot Sign Out Self Error Details
from line 744
688744
689745- `BetaCannotSignOutSelfErrorDetails object`
690746
691 The member is the user the API key or token belongs to.
692
693747 - `error_code: "cannot_sign_out_self"`
694748
695749### Beta Organization User
from line 813
759813 - `id: string`
760814
761815 ID of the User.
816
817## Errors
818
819### cannot_sign_out_primary_owner
820
821HTTP status 400
822
823- `"cannot_sign_out_primary_owner"`
824
825 The member is the organization's primary owner, whom no API key or token can sign out.
826
827 - `details: BetaCannotSignOutPrimaryOwnerErrorDetails`
828
829 - `error_code: "cannot_sign_out_primary_owner"`
830
831### cannot_sign_out_self
832
833HTTP status 400
834
835- `"cannot_sign_out_self"`
836
837 The member is the user the API key or token belongs to.
838
839 - `details: BetaCannotSignOutSelfErrorDetails`
840
841 - `error_code: "cannot_sign_out_self"`
842
843### cannot_sign_out_managed_member
844
845HTTP status 403
846
847- `"cannot_sign_out_managed_member"`
848
849 The member has the `managed` role, and this API key or token cannot sign them out. The error message says which keys and tokens can.
850
851 - `details: BetaCannotSignOutManagedMemberErrorDetails`
852
853 - `error_code: "cannot_sign_out_managed_member"`
854
855### cannot_sign_out_membership_admin
856
857HTTP status 403
858
859- `"cannot_sign_out_membership_admin"`
860
861 The member is a membership admin, and the person the API key or token belongs to is not allowed to sign out membership admins.
862
863 - `details: BetaCannotSignOutMembershipAdminErrorDetails`
864
865 - `error_code: "cannot_sign_out_membership_admin"`
866
867### cannot_sign_out_owner
868
869HTTP status 403
870
871- `"cannot_sign_out_owner"`
872
873 The member is an owner or has owner permissions, and this API key or token cannot sign them out. In a Claude Enterprise organization, an API key with the `write:members` scope can.
874
875 - `details: BetaCannotSignOutOwnerErrorDetails`
876
877 - `error_code: "cannot_sign_out_owner"`
878
879### cannot_sign_out_privileged_member
880
881HTTP status 403
882
883- `"cannot_sign_out_privileged_member"`
884
885 This OAuth token cannot sign out a membership admin or a member whose roles grant owner, user management, or identity and access management.
886
887 - `details: BetaCannotSignOutPrivilegedMemberErrorDetails`
888
889 - `error_code: "cannot_sign_out_privileged_member"`
762890