Skip to content
Get started

Remove a user from an organization

UserRemoveResponse orgs().users().remove(UserRemoveParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
delete/v1/orgs/{orgId}/users

Removes a user's association with an organization, revoking their access to organization-specific resources. The user account remains active but is no longer linked to this organization.

ParametersExpand Collapse
UserRemoveParams params
Optional<String> orgId

Unique organization identifier. Format: org_{32-hex-chars}

String userId

User ID to remove from the organization. Format: usr_{32-hex-chars}

ReturnsExpand Collapse
class UserRemoveResponse:

Standard success response with optional message

boolean success
Optional<String> message
Remove a user from an organization
package com.avara.example;

import com.avara.client.AvaraClient;
import com.avara.client.okhttp.AvaraOkHttpClient;
import com.avara.models.orgs.users.UserRemoveParams;
import com.avara.models.orgs.users.UserRemoveResponse;

public final class Main {
    private Main() {}

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

        UserRemoveParams params = UserRemoveParams.builder()
            .orgId("org_1234567890abcdef1234567890abcdef")
            .userId("usr_1234567890abcdef1234567890abcdef")
            .build();
        UserRemoveResponse user = client.orgs().users().remove(params);
    }
}
{
  "success": true,
  "message": "Operation completed successfully"
}
Returns Examples
{
  "success": true,
  "message": "Operation completed successfully"
}