Skip to content

Lingo API

The lingo namespace serves the Mukoko Lingo learning surface—languages, phrases and translations, learner progress, XP, and study session logging. It is backed by the mukoko_lingo_db Supabase project.

Use these endpoints when building learner-facing experiences or analytics tools that read learner progress.

Base path: /v1/lingo

MethodPathAuthPurpose
GET/v1/lingo/languagesOptionalList supported languages.
GET/v1/lingo/phrasesOptionalList phrases. Supports language, limit, offset.
GET/v1/lingo/phrases/{phrase_id}OptionalFetch a phrase with its translations.
GET/v1/lingo/me/progressRequiredReturn phrase progress for the caller.
GET/v1/lingo/me/xpRequiredReturn XP and level for the caller.
POST/v1/lingo/me/study-sessionsRequiredLog a study session for the caller.
Terminal window
curl https://api.nyuchi.com/v1/lingo/languages
{
"data": [
{ "code": "sn", "name": "Shona" },
{ "code": "nd", "name": "Ndebele" }
],
"count": 2
}
Terminal window
curl https://api.nyuchi.com/v1/lingo/phrases/phr_01
{
"id": "phr_01",
"text": "Mangwanani",
"translation": [
{ "language_code": "en", "text": "Good morning" }
]
}

The session is recorded against the authenticated learner.

Terminal window
curl -X POST https://api.nyuchi.com/v1/lingo/me/study-sessions \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"duration_seconds": 600,
"phrases_seen": 24,
"phrases_correct": 18,
"language_code": "sn"
}'