Claude Platform Docs

Pengguna

Daftar Pengguna
UserListPage beta().organization().users().list(params = UserListParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/users

Daftar anggota organisasi.

Dapatkan Pengguna
BetaOrganizationUser beta().organization().users().retrieve(params = UserRetrieveParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/users/{user_id}

Ambil anggota organisasi berdasarkan ID pengguna.

Perbarui Pengguna
BetaOrganizationUser beta().organization().users().update(params, requestOptions = RequestOptions.none())
POST/v1/organizations/users/{user_id}

Perbarui peran organisasi anggota.

Hapus Pengguna
UserRemoveResponse beta().organization().users().remove(params = UserRemoveParams.none(), requestOptions = RequestOptions.none())
DELETE/v1/organizations/users/{user_id}

Hapus anggota dari organisasi.

Keluarkan Pengguna dari Sesi
BetaOrganizationUser beta().organization().users().signOut(params = UserSignOutParams.none(), requestOptions = RequestOptions.none())
POST/v1/organizations/users/{user_id}/sign_out
Requires anthropic-beta: admin-user-sign-out-2026-10-08. Learn how to send beta headers.

Mengeluarkan anggota dari semua sesi Claude di mana saja, tanpa menghapus mereka dari organisasi. Ini mengakhiri sesi masuk mereka dan menghapus perangkat tepercaya mereka di mana pun mereka menggunakan Claude, termasuk di organisasi lain dan paket individu. Ini juga mengakhiri token OAuth yang diterbitkan untuk mereka bagi organisasi ini, sehingga aplikasi seperti Claude Code harus masuk kembali.

Models
class BetaCannotSignOutManagedMemberErrorDetails { errorCode; }
JsonValue errorCode = "cannot_sign_out_managed_member"
class BetaCannotSignOutMembershipAdminErrorDetails { errorCode; }
JsonValue errorCode = "cannot_sign_out_membership_admin"
class BetaCannotSignOutOwnerErrorDetails { errorCode; }
JsonValue errorCode = "cannot_sign_out_owner"
class BetaCannotSignOutPrimaryOwnerErrorDetails { errorCode; }
JsonValue errorCode = "cannot_sign_out_primary_owner"
class BetaCannotSignOutPrivilegedMemberErrorDetails { errorCode; }
JsonValue errorCode = "cannot_sign_out_privileged_member"
class BetaCannotSignOutSelfErrorDetails { errorCode; }
JsonValue errorCode = "cannot_sign_out_self"
class BetaOrganizationUser { type = "user"; id; addedAt; /* 3 more */ }
JsonValue type = "user"

Object type.

For Users, this is always "user".

String id

ID of the User.

OffsetDateTime addedAt

RFC 3339 datetime string indicating when the User joined the Organization.

formatdate-time
String email

Email of the User.

String name

Name of the User.

Organization role of the User.

One of the following:
ADMIN("admin")
BILLING("billing")
CLAUDE_CODE_USER("claude_code_user")
DEVELOPER("developer")
MANAGED("managed")
MEMBERSHIP_ADMIN("membership_admin")
OWNER("owner")
PRIMARY_OWNER("primary_owner")
USER("user")
Errors
class BetaCannotSignOutPrimaryOwnerException extends BadRequestException { details; }⁠HTTP status 400

The member is the organization's primary owner, whom no API key or token can sign out.

JsonValue errorCode = "cannot_sign_out_primary_owner"
class BetaCannotSignOutSelfException extends BadRequestException { details; }⁠HTTP status 400

The member is the user the API key or token belongs to.

JsonValue errorCode = "cannot_sign_out_self"
class BetaCannotSignOutManagedMemberException extends PermissionDeniedException { details; }⁠HTTP status 403

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.

JsonValue errorCode = "cannot_sign_out_managed_member"
class BetaCannotSignOutMembershipAdminException extends PermissionDeniedException { details; }⁠HTTP status 403

The member is a membership admin, and the person the API key or token belongs to is not allowed to sign out membership admins.

JsonValue errorCode = "cannot_sign_out_membership_admin"
class BetaCannotSignOutOwnerException extends PermissionDeniedException { details; }⁠HTTP status 403

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.

JsonValue errorCode = "cannot_sign_out_owner"
class BetaCannotSignOutPrivilegedMemberException extends PermissionDeniedException { details; }⁠HTTP status 403

This OAuth token cannot sign out a membership admin or a member whose roles grant owner, user management, or identity and access management.

JsonValue errorCode = "cannot_sign_out_privileged_member"