Claude Platform Docs

Пользователи

Список пользователей
client.Beta.Organization.Users.List(ctx, query) (*Page[BetaOrganizationUser], error)
GET/v1/organizations/users

Возвращает список участников организации.

Получить пользователя
client.Beta.Organization.Users.Get(ctx, userID) (*BetaOrganizationUser, error)
GET/v1/organizations/users/{user_id}

Возвращает участника организации по идентификатору пользователя.

Обновить пользователя
client.Beta.Organization.Users.Update(ctx, userID, body) (*BetaOrganizationUser, error)
POST/v1/organizations/users/{user_id}

Обновляет роль участника в организации.

Удалить пользователя
client.Beta.Organization.Users.Remove(ctx, userID) (*BetaOrganizationUserRemoveResponse, error)
DELETE/v1/organizations/users/{user_id}

Удаляет участника из организации.

Выход пользователя из системы
client.Beta.Organization.Users.SignOut(ctx, userID, body) (*BetaOrganizationUser, error)
POST/v1/organizations/users/{user_id}/sign_out
Requires anthropic-beta: admin-user-sign-out-2026-10-08. Learn how to send beta headers.

Выполняет выход участника из Claude везде, где он использует Claude, не удаляя его из организации. Это завершает его сеансы входа и удаляет его доверенные устройства везде, где он использует Claude, включая другие организации и индивидуальные планы. Также аннулируются токены OAuth, выданные ему для этой организации, поэтому таким приложениям, как Claude Code, придётся снова выполнить вход.

Models
type BetaCannotSignOutManagedMemberErrorDetails struct { ErrorCode }
ErrorCode BetaCannotSignOutManagedMemberErrorCode
type BetaCannotSignOutMembershipAdminErrorDetails struct { ErrorCode }
ErrorCode BetaCannotSignOutMembershipAdminErrorCode
type BetaCannotSignOutOwnerErrorDetails struct { ErrorCode }
ErrorCode BetaCannotSignOutOwnerErrorCode
type BetaCannotSignOutPrimaryOwnerErrorDetails struct { ErrorCode }
ErrorCode BetaCannotSignOutPrimaryOwnerErrorCode
type BetaCannotSignOutPrivilegedMemberErrorDetails struct { ErrorCode }
ErrorCode BetaCannotSignOutPrivilegedMemberErrorCode
type BetaCannotSignOutSelfErrorDetails struct { ErrorCode }
ErrorCode BetaCannotSignOutSelfErrorCode
type BetaOrganizationUser struct { Type: "user"; ID; AddedAt; /* 3 more */ }
Errors
const ErrorCodeBetaCannotSignOutPrimaryOwner ErrorCode = "cannot_sign_out_primary_owner"⁠HTTP status 400

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

const ErrorCodeBetaCannotSignOutSelf ErrorCode = "cannot_sign_out_self"⁠HTTP status 400

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

const ErrorCodeBetaCannotSignOutManagedMember ErrorCode = "cannot_sign_out_managed_member"⁠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.

const ErrorCodeBetaCannotSignOutMembershipAdmin ErrorCode = "cannot_sign_out_membership_admin"⁠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.

const ErrorCodeBetaCannotSignOutOwner ErrorCode = "cannot_sign_out_owner"⁠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.

const ErrorCodeBetaCannotSignOutPrivilegedMember ErrorCode = "cannot_sign_out_privileged_member"⁠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.