Add a user to a customer
client.express.users.add(stringexpressCustomerID, UserAddParams { userId } body, RequestOptionsoptions?): UserAddResponse { success, message }
POST/v1/express/{expressCustomerId}/users
Associates an existing user with a customer, granting them access to customer-specific resources and studies.
Parameters
expressCustomerID: string
Unique Express customer identifier. Format: cus_{32-hex-chars}
Returns
Add a user to 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 response = await client.express.users.add('cus_1234567890abcdef1234567890abcdef', {
userId: 'usr_1234567890abcdef1234567890abcdef',
});
console.log(response.success);{
"success": true,
"message": "Operation completed successfully"
}Returns Examples
{
"success": true,
"message": "Operation completed successfully"
}