Skip to content
Get started

Remove a user from a customer

client.express.users.remove(stringexpressCustomerID, UserRemoveParams { userId } body, RequestOptionsoptions?): UserRemoveResponse { success, message }
DELETE/v1/express/{expressCustomerId}/users

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

ParametersExpand Collapse
expressCustomerID: string

Unique Express customer identifier. Format: cus_{32-hex-chars}

body: UserRemoveParams { userId }
userId: string

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

ReturnsExpand Collapse
UserRemoveResponse { success, message }

Standard success response with optional message

success: boolean
message?: string

Remove a user from a customer

import Avara from 'avara';

const client = new Avara({
  apiKey: process.env['AVARA_API_KEY'], // This is the default and can be omitted
});

const user = await client.express.users.remove('cus_1234567890abcdef1234567890abcdef', {
  userId: 'usr_1234567890abcdef1234567890abcdef',
});

console.log(user.success);
{
  "success": true,
  "message": "Operation completed successfully"
}
Returns Examples
{
  "success": true,
  "message": "Operation completed successfully"
}