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 with organization name. 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 AND organization_name for multi-tenant access control
- Organization name used by frontend to enable/disable features (e.g., “super-ai” org)
- Profile data is read-only via this endpoint (use PATCH /profile/me to update)
- User role determines API permissions across the platform
Behavior:
- Extracts user_id from authenticated user context
- Queries database for complete user profile by user_id
- Queries organization to get organization name
- Returns user profile with organization_name included
- 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.)
- Check organization name for feature gating (e.g., credits visible for “super-ai”)
- 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:
- PATCH /profile/me - Update current user’s name
- GET /admin/users/ - Admin endpoint to view any user
- GET /admin/organizations//users - List users in organization
- GET /organizations//credits - View organization credit balance
Authorizations
API key authentication. Include your API key in the X-API-Key header as: X-API-Key YOUR_API_KEY
Example:
JWT Bearer token authentication. Include your access token in the Authorization header as: Bearer YOUR_ACCESS_TOKEN
Example:
Response
User profile retrieved successfully
User profile response with organization name included.