Get Account Info
Retrieve the authenticated user's account information.
Returns comprehensive user profile data including role, department, permissions, and organizational hierarchy. Automatically updates the user's avatar if it has changed in the authentication system.
Authentication: Required - uses the authenticated user's credentials
Args:
background_tasks: FastAPI background tasks handler (automatically injected)user: Authenticated user information (automatically injected)
Returns:
- User account information including:
- Basic profile (name, email, job title)
- Organizational data (department, role, manager)
- System settings (language, timezone, avatar)
- Permissions and access levels
Raises:
404 Not Found: User account not found in the system401 Unauthorized: User account is not active500 Internal Server Error: Failed to retrieve account information
Example Response:
{
"id": "u-user123",
"firstName": "John",
"lastName": "Smith",
"email": "john.smith@company.com",
"status": 1,
"role": 2,
"roleName": "Account Executive",
"department": 5,
"departmentName": "Sales",
"managerId": "u-manager456",
"timezone": "America/New_York"
}
Note: This endpoint includes retry logic for users with PENDING status and automatically syncs avatar URLs from the authentication provider.
Responses
- application/json
Request Example for get/me/
curl https://crm.dreamhub.ai/api/v1/users/me/ \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
null
