Skip to content
Get started

Add a user to an organization

orgs.users.add(strorg_id, UserAddParams**kwargs) -> UserAddResponse
post/v1/orgs/{orgId}/users

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

ParametersExpand Collapse
org_id: str

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

user_id: str

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

ReturnsExpand Collapse
class UserAddResponse:

Standard success response with optional message

success: bool
message: Optional[str]
Add a user to an organization
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.orgs.users.add(
    org_id="org_1234567890abcdef1234567890abcdef",
    user_id="usr_1234567890abcdef1234567890abcdef",
)
print(response.success)
{
  "success": true,
  "message": "Operation completed successfully"
}
Returns Examples
{
  "success": true,
  "message": "Operation completed successfully"
}