SuperAI Flow Platform

Sections

Theme switcher

Get current user profile

Retrieve complete profile information for the currently authenticated user.

Returns the full user profile including personal information, role, status, and organization membership. The user is automatically identified from their authentication credentials. No user ID parameter is needed.

Context: - Returns user regardless of active/inactive/pending status - Includes organization_id for multi-tenant access control - Profile data is read-only via this endpoint (use PUT /profile/me to update) - User role determines API permissions across the platform

Behavior: 1. Extracts user_id from authenticated user context 2. Queries database for complete user profile by user_id 3. Returns user profile if found 4. Raises 404 if user exists in auth system but not in database (rare edge case)

Use Cases: - Display user name and email in application header - Check user role to show/hide UI features (org_admin, app_user, etc.) - Verify user's organization for multi-tenant data filtering - Determine user status for account activation workflows - Fetch user details after authentication to initialize session

Related Endpoints: - PUT /profile/me - Update current user's name - GET /admin/users/{user_id} - Admin endpoint to view any user - GET /admin/organizations/{org_id}/users - List users in organization

Header Parameters

Authorizationstring

Response

200
Object
User profile retrieved successfully

Response Attributes

created_atstring
emailstring Required
first_namestring Required
idstring
last_namestring Required
modified_bystring
organization_idstring Required
rolestring
Default value
app_user
Enum values:
org_adminbackofficeapp_userintegration
statusstring
Default value
pending
Enum values:
pendingactiveinactive
updated_atstring
user_auth_idnull
401
Object
Unauthorized - Missing or invalid authentication credentials

Response Attributes

errorobject Required

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

request_idnull
404
Object
User account not found in database despite valid authentication token

Response Attributes

errorobject Required

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

request_idnull
500
Object
Internal Server Error - An unexpected error occurred

Response Attributes

errorobject Required

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

request_idnull
Was this section helpful?

What made this section unhelpful for you?

GET

/

Select
1

Response

Was this section helpful?

What made this section unhelpful for you?

View as Markdown

Ask an AI

Open in ChatGPTOpen in ClaudeOpen in Perplexity

Code with AI

Open in Copilot