Skip to main content

GET /v1/user/preferences

Get the current preferences for a user.

Authentication

Requires User API Key in the X-API-Key header.

Request

GET https://api.syncline.run/v1/user/preferences

Response

{
  "email": "alice@example.com",
  "preferences": {
    "work_hours": {
      "monday": { "enabled": true, "start": "09:00", "end": "17:00" },
      "tuesday": { "enabled": true, "start": "09:00", "end": "17:00" },
      "wednesday": { "enabled": true, "start": "09:00", "end": "17:00" },
      "thursday": { "enabled": true, "start": "09:00", "end": "17:00" },
      "friday": { "enabled": true, "start": "09:00", "end": "17:00" },
      "saturday": { "enabled": false, "start": "09:00", "end": "17:00" },
      "sunday": { "enabled": false, "start": "09:00", "end": "17:00" }
    },
    "timezone": "America/New_York",
    "buffer_minutes": 15,
    "availability_window_days": 14,
    "max_meetings_per_day": 5,
    "energy_pattern": "morning_person",
    "scheduling_context": "Prefer mornings for strategic meetings",
    "focus_blocks": []
  }
}

PUT /v1/user/preferences

Update user scheduling preferences.

Authentication

Requires User API Key in the X-API-Key header.

Request

PUT https://api.syncline.run/v1/user/preferences

Request Body

{
  "work_hours": {
    "monday": { "enabled": true, "start": "10:00", "end": "18:00" }
  },
  "buffer_minutes": 30,
  "energy_pattern": "afternoon_person",
  "scheduling_context": "Prefer afternoons. Need 30min between meetings."
}
You only need to include fields you want to update - others remain unchanged.

Response

{
  "success": true,
  "email": "alice@example.com",
  "preferences": {
    // Updated preferences object
  }
}

Preference Fields

work_hours
object
Work hours for each day of the week. Each day has:
  • enabled: Whether you work this day
  • start: Start time in HH:MM format (e.g., “09:00”)
  • end: End time in HH:MM format (e.g., “17:00”)
timezone
string
IANA timezone (e.g., “America/New_York”, “Europe/London”)
buffer_minutes
integer
Minutes of buffer between meetings: 0, 15, or 30
availability_window_days
integer
How many days ahead to search for availability (7-90)
max_meetings_per_day
integer
Maximum meetings allowed per day (1-10)
energy_pattern
string
When you’re most productive:
  • flexible - No preference
  • morning_person - Best before noon
  • afternoon_person - Peak 12-5pm
  • evening_person - Best after 5pm
scheduling_context
string
Free-form text describing your preferences. The AI processes this with Claude LLM to generate SmartWeights.Example: “I prefer to keep Fridays meeting-free for deep work. Morning meetings work best for strategic discussions.”
focus_blocks
array
Protected time blocks for deep work:
[
  {
    "day": "tuesday",
    "start": "09:00",
    "end": "12:00",
    "reason": "Deep work - coding"
  }
]