Overview
The career profile APIs manage user career data including role, skills, goals, and preferences. This data powers TechCal’s personalized event scoring and recommendations.Career profiles are stored in the
career_profiles table with automatic cache invalidation.Authentication
All endpoints require a valid Supabase authentication token.GET /api/profile/career
Retrieve the authenticated user’s career profile.Request
Response
true if profile foundExample
Error Responses
PUT /api/profile/career
Update the authenticated user’s career profile. Creates profile if it doesn’t exist (upsert).Request
Body Parameters
All fields from the GET response can be updated. Minimum required fields:Job title
Career level (see GET response for options)
Industry focus
Current skills (at least one recommended)
Career objectives (at least one recommended)
Response
true if update succeededUpdated career profile (same schema as GET response)
Success message indicating cache invalidation status
Example
Error Responses
Data Flow
Profile Creation
- User completes career onboarding (
/onboarding/career) - Frontend calls
PUT /api/profile/careerwith full profile data - Backend upserts to
career_profilestable - Career impact cache is invalidated
- User redirected to dashboard
Profile Updates
- User updates profile in settings (
/dashboard/settings) - Frontend calls
PUT /api/profile/careerwith changed fields - Backend merges changes and saves
- All cached career impact scores are invalidated
- Next event fetch recalculates scores with new profile
Cache Invalidation
When career profile is updated, the following caches are cleared:- Redis career impact scores (key pattern:
career-impact:v2:*) - User-specific recommendation caches
- Dashboard analytics cache (for this user)
Validation Rules
Required Fields
currentRole- Must be non-empty stringseniority- Must be one of the predefined valuesindustry- Must be non-empty string
Recommended Fields
For best recommendation quality, provide:- At least 3
primarySkills - At least 2
skillsToLearn - At least 2
careerGoals - At least 3
interests
Optional Enhancements
skillTagswith proficiency levels improve skill matching precisionnetworkingGoalsenable better event filtering for networking opportunitiespreferredEventTypesinfluence event format recommendations
Related Endpoints
- GET /api/events/recommendations - Uses career profile for personalized recs
- POST /api/events/filtered - Uses career profile for scoring
- GET /api/dashboard/analytics - Shows career goal progress