Skip to main content

Overview

The profile preferences API manages user settings that control notifications, default filters, telemetry consent, and UI preferences. These settings are stored in the profiles.preferences JSONB field.
Preferences are separate from career profile data. They control UI behavior and system settings rather than recommendation scoring.

Authentication

Requires a valid Supabase authentication token.
Authorization: Bearer <supabase_access_token>

GET /api/profile

Retrieve the authenticated user’s full profile including preferences.

Request

GET /api/profile

Response

success
boolean
required
true if profile retrieved successfully
data
Profile

Example

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

PATCH /api/profile

Update user profile and preferences. Automatically invalidates profile cache.

Request

PATCH /api/profile

Body Parameters

fullName
string
User’s full name
timezone
string
IANA timezone string
preferences
object
Preferences object (partial updates supported)See GET response for full preferences schema

Response

success
boolean
required
true if update succeeded
data
Profile
required
Updated profile (same schema as GET)
message
string
Success message with cache invalidation confirmation

Example

curl -X PATCH https://kurecal.app/api/profile \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
    "preferences": {
      "notifications": {
        "email": true,
        "eventReminders": true,
        "weeklyDigest": false
      }
    }
  }'

Error Responses

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

Preference Categories

Notification Preferences

Control email and in-app notifications:
{
  notifications: {
    email: true,               // Master email toggle
    eventReminders: true,      // Event reminder emails (24h, 1h before)
    weeklyDigest: true,        // Weekly recommendation digest
    goalProgress: true,        // Career goal milestone notifications
    networkActivity: false     // Network follow/interaction notifications
  }
}

Filtering Preferences

Set default filters for event discovery:
{
  filtering: {
    defaultFormat: 'virtual',    // Default event format filter
    defaultBudget: 'free-only',  // Default budget filter
    showPastEvents: false,       // Include past events in results
    defaultSort: 'career-impact' // Default sort field
  }
}

Location Preferences

Location data for proximity scoring and timezone detection:
{
  location: {
    city: 'San Francisco',
    country: 'USA',
    timezone: 'America/Los_Angeles' // Optional override
  }
}

Calendar Sync Preferences

Control automatic calendar synchronization:
{
  calendarSync: {
    autoSync: true,           // Auto-sync bookmarked events
    syncAttendance: true,     // Sync attendance status changes
    provider: 'google',       // Active provider
    lastSyncAt: '2026-03-04T10:30:00Z'
  }
}
Manage analytics and telemetry consent:
{
  analyticsConsent: true,              // Master consent toggle
  analyticsConsentDate: '2026-01-15T08:00:00Z',
  telemetryDetails: {
    eventViews: true,                  // Track event views
    searchQueries: true,               // Track search queries
    recommendationInteractions: true,  // Track rec clicks
    featureUsage: true                // Track feature usage
  }
}

Privacy Controls

Opting Out of Analytics

To disable all analytics tracking:
await fetch('/api/profile', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${token}`
  },
  body: JSON.stringify({
    analyticsConsent: false
  })
});
Effect of opting out:
  • No telemetry events logged to database
  • No recommendation performance tracking
  • No search query analytics
  • Behavioral reranking disabled
  • User still receives personalized recommendations based on profile

Data Deletion

To request full data deletion, contact support at [email protected]. This will:
  • Delete career profile
  • Delete tracked events
  • Delete telemetry data
  • Delete calendar sync data
  • Anonymize remaining records

Cache Behavior

Preference updates trigger cache invalidation:
  • Profile cache: Cleared immediately
  • Recommendation cache: Cleared if location changes
  • Analytics cache: Cleared if consent changes
  • Calendar sync cache: Cleared if sync settings change
Preference changes take effect immediately. No app reload required.

Build docs developers (and LLMs) love