Documentation

Preferences

Get user preferences

Returns the user's Pomodoro preferences. If no preferences exist, creates and returns default preferences.

Production (Pomodoro microservice)StagingUAT
GEThttps://pomodoro.ankiren.com/api/me/pomodoro/preferences

Responses

200 · User preferences

  • preferencesPomodoroPreference
    • idintegerRequired

      Preference record ID

    • userIdstringRequired

      User ID

    • workDurationintegerRequired

      Work session duration in seconds (default 1500 = 25 min)

    • shortBreakDurationintegerRequired

      Short break duration in seconds (default 300 = 5 min)

    • longBreakDurationintegerRequired

      Long break duration in seconds (default 900 = 15 min)

    • longBreakIntervalintegerRequired

      Number of work sessions before long break (default 4)

    • autoStartBreaksbooleanRequired

      Auto-start break after work session

    • autoStartWorkbooleanRequired

      Auto-start work after break

    • soundEnabledbooleanRequired

      Enable notification sounds

    • soundVolumenumberRequired

      Sound volume (0.0 to 1.0)

      format: float
    • createdAtstring<date-time>
      format: date-time
    • updatedAtstring<date-time>
      format: date-time
application/json
{
  "preferences": {
    "id": 1,
    "userId": "clxyz123",
    "workDuration": 1500,
    "shortBreakDuration": 300,
    "longBreakDuration": 900,
    "longBreakInterval": 4,
    "autoStartBreaks": false,
    "autoStartWork": false,
    "soundEnabled": true,
    "soundVolume": 0.3,
    "createdAt": "2026-01-10T10:00:00Z",
    "updatedAt": "2026-01-10T10:00:00Z"
  }
}

Sample Code

Đổi ngôn ngữ ở ô Language trên thanh Documentation.

cURL
curl -X GET 'https://pomodoro.ankiren.com/api/me/pomodoro/preferences' \
  -H 'Authorization: Bearer <token>' \
  -H 'Accept: application/json'