Claude Platform Docs

Remove User

UserRemoveResponse beta().organization().users().remove(UserRemoveParamsparams = UserRemoveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
DELETE/v1/organizations/users/{user_id}

Remove a member from the organization.

Parameters
UserRemoveParams params
Optional<String> userId

ID of the User.

Returns
class UserRemoveResponse:
String id

ID of the User.

JsonValue type "user_deleted"constant

Deleted object type.

For Users, this is always "user_deleted".

Remove User

package com.anthropic.example;

import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.beta.organization.users.UserRemoveParams;
import com.anthropic.models.beta.organization.users.UserRemoveResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();

        UserRemoveResponse user = client.beta().organization().users().remove("user_id");
    }
}
{
  "id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
  "type": "user_deleted"
}
Returns Examples
{
  "id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
  "type": "user_deleted"
}