Claude Platform Docs

ユーザーを更新

BetaOrganizationUser Beta.Organization.Users.Update(parameters, cancellationToken = default)
POST/v1/organizations/users/{user_id}

メンバーの組織ロールを更新します。

Parameters
UserUpdateParams parameters
required string userID

ID of the User.

required Role role

New role for the User.

The accepted values depend on the organization type. Console and API organizations accept user, developer, billing, and claude_code_user; admin cannot be assigned through the API. Claude Enterprise organizations accept user and managed.

Billing("billing")
ClaudeCodeUser("claude_code_user")
Developer("developer")
Managed("managed")
User("user")
Returns
class BetaOrganizationUser { Type = "user"; ID; AddedAt; /* 3 more */ }
JsonElement Type = "user"

Object type.

For Users, this is always "user".

required string ID

ID of the User.

required DateTimeOffset AddedAt

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

formatdate-time
required string Email

Email of the User.

required string Name

Name of the User.

required BetaOrganizationRole Role

Organization role of the User.

One of the following:
Admin("admin")
Billing("billing")
ClaudeCodeUser("claude_code_user")
Developer("developer")
Managed("managed")
MembershipAdmin("membership_admin")
Owner("owner")
PrimaryOwner("primary_owner")
User("user")
ユーザーを更新
UserUpdateParams parameters = new()
{
    UserID = "user_id",
    Role = Role.User,
};

var betaOrganizationUser = await client.Beta.Organization.Users.Update(parameters);

Console.WriteLine(betaOrganizationUser);
Returns Examples
Response 200
{
  "id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
  "added_at": "2024-10-30T23:58:27.427722Z",
  "email": "user@emaildomain.com",
  "name": "Jane Doe",
  "role": "admin",
  "type": "user"
}