List organization users
Retrieve all users belonging to a specific organization.
This endpoint returns a complete list of users within an organization, including the organization name for each user. Use this to manage organization membership, audit user access, or populate organization user interfaces.
Context: - Returns users regardless of their active/inactive status - Includes organization name in each user response for convenience - Users are ordered by creation date (newest first) - Each user includes full profile information and role - Organization must exist (404 if not found) - No pagination implemented yet (loads all users in memory)
Behavior: 1. Validates organization exists by ID 2. Queries all users with matching organization_id 3. Joins with organization table to include organization_name 4. Orders results by created_at descending 5. Returns complete user list with organization details Performance Notes: - Current implementation loads all users in memory - Suitable for organizations with < 1000 users - For larger organizations, pagination should be added (see TODOs.md) - Database query includes JOIN with organization table
Use Cases: - Display organization members in admin dashboard - Generate user access reports for specific organization - Audit which users have access to organization resources - Populate user selection dropdowns filtered by organization - Export organization user lists for compliance
Related Endpoints: - POST /admin/organizations/{id}/users - Add user to organization - GET /admin/organizations/{id}/users/count - Get user count only - GET /admin/users - List all users across organizations - GET /admin/users/{user_id} - Get individual user details
Header Parameters
Path Parameters
Unique identifier of the organization to query users from. Organization must exist in database.
Response
Response Attributes
Timestamp when user was created (ISO 8601 UTC).
User's email address. Unique within organization. Used for login and notifications.
User's first name. Used in UI displays and emails.
Unique identifier for the user. Format: UUID v4
User's last name. Used in UI displays and emails.
Identifier of the user or system that last modified this user. Used for audit trail.
UUID of the organization this user belongs to.
Display name of the user's organization. Included for convenience to avoid additional API calls. Useful in user lists and dashboards showing cross-organization data.
User's role within the organization. Values: 'org_admin', 'backoffice', 'app_user', 'integration'
User's account status. Values: 'active', 'inactive'. 'active' users can log in; 'inactive' users cannot.
Timestamp when user was last modified (ISO 8601 UTC).
Response Attributes
Standard error detail structure.
This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.
Show child attributes
Response Attributes
Standard error detail structure.
This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.
Show child attributes
Response Attributes
Standard error detail structure.
This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.
Show child attributes
Response Attributes
Show child attributes
Response Attributes
Standard error detail structure.
This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.