Claude Platform Docs

Utenti

Elenca gli utenti
beta.organization.users.list(**kwargs) -> SyncPage[BetaOrganizationUser]
GET/v1/organizations/users

Elenca i membri dell'organizzazione.

Ottieni utente
beta.organization.users.retrieve(user_id) -> BetaOrganizationUser
GET/v1/organizations/users/{user_id}

Recupera un membro dell'organizzazione tramite ID utente.

Aggiorna utente
beta.organization.users.update(user_id, **kwargs) -> BetaOrganizationUser
POST/v1/organizations/users/{user_id}

Aggiorna il ruolo di un membro nell'organizzazione.

Rimuovi utente
beta.organization.users.remove(user_id) -> UserRemoveResponse
DELETE/v1/organizations/users/{user_id}

Rimuovi un membro dall'organizzazione.

Disconnetti utente
beta.organization.users.sign_out(user_id, **kwargs) -> BetaOrganizationUser
POST/v1/organizations/users/{user_id}/sign_out
Requires anthropic-beta: admin-user-sign-out-2026-10-08. Learn how to send beta headers.

Disconnetti un membro da Claude ovunque, senza rimuoverlo dall'organizzazione. Questa operazione termina le sue sessioni di accesso e rimuove i suoi dispositivi attendibili ovunque utilizzi Claude, incluse altre organizzazioni e piani individuali. Termina inoltre i token OAuth emessi a suo nome per questa organizzazione, quindi app come Claude Code devono accedere di nuovo.

Models
class BetaCannotSignOutManagedMemberErrorDetails: error_code
error_code: Literal["cannot_sign_out_managed_member"]
class BetaCannotSignOutMembershipAdminErrorDetails: error_code
error_code: Literal["cannot_sign_out_membership_admin"]
class BetaCannotSignOutOwnerErrorDetails: error_code
error_code: Literal["cannot_sign_out_owner"]
class BetaCannotSignOutPrimaryOwnerErrorDetails: error_code
error_code: Literal["cannot_sign_out_primary_owner"]
class BetaCannotSignOutPrivilegedMemberErrorDetails: error_code
error_code: Literal["cannot_sign_out_privileged_member"]
class BetaCannotSignOutSelfErrorDetails: error_code
error_code: Literal["cannot_sign_out_self"]
class BetaOrganizationUser: type: "user"; id; added_at; ... # 3 more
type: Literal["user"]

Object type.

For Users, this is always "user".

defaultuser
id: str

ID of the User.

added_at: datetime

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

formatdate-time
email: str

Email of the User.

name: str

Name of the User.

Organization role of the User.

One of the following:
"admin"
"billing"
"claude_code_user"
"developer"
"managed"
"membership_admin"
"owner"
"primary_owner"
"user"
class UserRemoveResponse: type: "user_deleted"; id
type: Literal["user_deleted"]

Deleted object type.

For Users, this is always "user_deleted".

defaultuser_deleted
id: str

ID of the User.

Errors
class BetaCannotSignOutPrimaryOwnerError(BadRequestError): error_code; details⁠HTTP status 400

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

error_code: Literal["cannot_sign_out_primary_owner"]
error_code: Literal["cannot_sign_out_primary_owner"]
class BetaCannotSignOutSelfError(BadRequestError): error_code; details⁠HTTP status 400

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

error_code: Literal["cannot_sign_out_self"]
error_code: Literal["cannot_sign_out_self"]
class BetaCannotSignOutManagedMemberError(PermissionDeniedError): error_code; 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.

error_code: Literal["cannot_sign_out_managed_member"]
error_code: Literal["cannot_sign_out_managed_member"]
class BetaCannotSignOutMembershipAdminError(PermissionDeniedError): error_code; 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.

error_code: Literal["cannot_sign_out_membership_admin"]
error_code: Literal["cannot_sign_out_membership_admin"]
class BetaCannotSignOutOwnerError(PermissionDeniedError): error_code; 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.

error_code: Literal["cannot_sign_out_owner"]
error_code: Literal["cannot_sign_out_owner"]
class BetaCannotSignOutPrivilegedMemberError(PermissionDeniedError): error_code; 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.

error_code: Literal["cannot_sign_out_privileged_member"]
error_code: Literal["cannot_sign_out_privileged_member"]