The Progress API gives learners and front-end clients a full picture of where a user stands in their Sealearn journey: accumulated XP, current level, active streak, hearts, gem balance, daily goal targets, completed lessons, and unlocked achievements. It also exposes the weekly league leaderboard — a gamified ranking that resets every Monday and groups users by their league tier.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/DerBasilisk/SEA-ServicioEvaluaconAsistida/llms.txt
Use this file to discover all available pages before exploring further.
UserProgress model
AUserProgress document is created automatically the first time a user interacts with a lesson. One document exists per user-lesson pair.
Reference to the User document.
Reference to the Lesson document.
Current state of the lesson for this user:
locked, available, in_progress, or completed. Defaults to locked.How many times the user has successfully completed this lesson. Used to determine when the next lesson in the unit unlocks (threshold: 4 completions).
Highest session score achieved (0–100, percentage of correct answers). Defaults to
0.Score of the most recent completed session.
Cumulative XP earned across all sessions on this lesson.
Timestamp of the most recent successful completion.
Tracks the in-progress session. Cleared when the session completes or is abandoned.
SM-2 spaced-repetition state for this lesson.
Record of which questions from this lesson the user has been shown, and how many times. Used by the question-refresh service to vary the question pool.
Endpoints
GET /api/progress/me
Returns a comprehensive progress dashboard for the authenticated user, including XP and level metrics, streak details, weekly statistics, and the count of achievements unlocked. Authentication: Bearer token required.true on success.GET /api/progress/leaderboard
Returns the weekly XP ranking for the authenticated user’s league room. League rooms are scoped to a single calendar week (Monday to Sunday) and a league tier (e.g.bronze, silver, gold). If the user has no room for the current week, one is assigned automatically before returning the results.
Authentication: Bearer token required.
true on success.Ranked array of member entries for the user’s current league room, sorted by
xpEarned descending.League rooms reset every Monday. XP earned in a previous week does not carry over to the next room’s ranking, though it still counts toward the user’s all-time total XP.
GET /api/progress/achievements
Returns every active achievement in the system, each annotated with whether the authenticated user has unlocked it. Unlocked achievements are identified by comparing the user’sachievements array against the full catalogue.
Authentication: Bearer token required.
true on success.Array of all active achievement documents.
PUT /api/progress/daily-goal
Sets the user’s daily XP target. The goal is displayed in the app as a progress bar the user aims to fill each day. The value must be one of the four predefined tiers. Authentication: Bearer token required. Request bodyTarget XP per day. Must be exactly one of:
10, 20, 30, 50.true on success.POST /api/progress/refill-hearts
Spends 50 gems to instantly restore the user’s hearts to the maximum of 5. This is only permitted when the user’s current heart count is below 5 and they have sufficient gems. Authentication: Bearer token required.true on success.| Condition | HTTP status | Message |
|---|---|---|
| Hearts are already at 5 | 400 | "Ya tenés 5 vidas" |
| Fewer than 50 gems available | 400 | "Necesitás 50 gemas. Tenés {n}" |
Hearts also refill automatically. If the user’s hearts hit zero, the server checks on the next lesson completion whether 30 minutes have elapsed since
hearts.lastRefill; if so, hearts are restored for free. The manual refill via this endpoint bypasses the timer entirely.