Skip to main content

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.
Authorization: Bearer <supabase_access_token>

GET /api/profile/career

Retrieve the authenticated user’s career profile.

Request

GET /api/profile/career

Response

success
boolean
required
true if profile found
data
CareerProfile | null

Example

curl -X GET https://kurecal.app/api/profile/career \
  -H "Authorization: Bearer <token>"

Error Responses

{
  "success": false,
  "error": "Authentication required"
}

PUT /api/profile/career

Update the authenticated user’s career profile. Creates profile if it doesn’t exist (upsert).
Updating career profile invalidates all career impact score caches. New scores will be calculated on next event fetch.

Request

PUT /api/profile/career

Body Parameters

All fields from the GET response can be updated. Minimum required fields:
currentRole
string
required
Job title
seniority
string
required
Career level (see GET response for options)
industry
string
required
Industry focus
primarySkills
string[]
Current skills (at least one recommended)
careerGoals
string[]
Career objectives (at least one recommended)

Response

success
boolean
required
true if update succeeded
data
CareerProfile
required
Updated career profile (same schema as GET response)
message
string
Success message indicating cache invalidation status

Example

curl -X PUT https://kurecal.app/api/profile/career \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
    "currentRole": "Senior Software Engineer",
    "seniority": "senior",
    "industry": "Technology/Software",
    "primarySkills": ["Python", "React", "AWS"],
    "skillsToLearn": ["Kubernetes", "Machine Learning"],
    "careerGoals": ["skill-development", "leadership-growth"],
    "timeframe": "short-term",
    "budget": "moderate"
  }'

Error Responses

{
  "success": false,
  "error": "Authentication required"
}

Data Flow

Profile Creation

  1. User completes career onboarding (/onboarding/career)
  2. Frontend calls PUT /api/profile/career with full profile data
  3. Backend upserts to career_profiles table
  4. Career impact cache is invalidated
  5. User redirected to dashboard

Profile Updates

  1. User updates profile in settings (/dashboard/settings)
  2. Frontend calls PUT /api/profile/career with changed fields
  3. Backend merges changes and saves
  4. All cached career impact scores are invalidated
  5. 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)
Cache invalidation happens automatically - no manual intervention needed.

Validation Rules

Required Fields

  • currentRole - Must be non-empty string
  • seniority - Must be one of the predefined values
  • industry - Must be non-empty string
For best recommendation quality, provide:
  • At least 3 primarySkills
  • At least 2 skillsToLearn
  • At least 2 careerGoals
  • At least 3 interests

Optional Enhancements

  • skillTags with proficiency levels improve skill matching precision
  • networkingGoals enable better event filtering for networking opportunities
  • preferredEventTypes influence event format recommendations

Build docs developers (and LLMs) love