Skip to content
Get started

Add a user to a customer

express.users.add(strexpress_customer_id, UserAddParams**kwargs) -> UserAddResponse
POST/v1/express/{expressCustomerId}/users

Associates an existing user with a customer, granting them access to customer-specific resources and studies.

ParametersExpand Collapse
express_customer_id: str

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

user_id: str

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

ReturnsExpand Collapse
class UserAddResponse:

Standard success response with optional message

success: bool
message: Optional[str]

Add a user to a customer

import os
from avara import Avara

client = Avara(
    api_key=os.environ.get("AVARA_API_KEY"),  # This is the default and can be omitted
)
response = client.express.users.add(
    express_customer_id="cus_1234567890abcdef1234567890abcdef",
    user_id="usr_1234567890abcdef1234567890abcdef",
)
print(response.success)
{
  "success": true,
  "message": "Operation completed successfully"
}
Returns Examples
{
  "success": true,
  "message": "Operation completed successfully"
}