Claude Platform Docs

Remove User

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

Remove a member from the organization.

Parameters
user_id: String

ID of the User.

Returns
class UserRemoveResponse { id, type }
id: String

ID of the User.

type: :user_deleted

Deleted object type.

For Users, this is always "user_deleted".

Remove User

require "anthropic"

anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")

user = anthropic.beta.organization.users.remove("user_id")

puts(user)
{
  "id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
  "type": "user_deleted"
}
Returns Examples
{
  "id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
  "type": "user_deleted"
}