A complete REST API for integrating Lernix into your stack. All endpoints accept and return JSON.
https://api.lernix.appIssue and revoke access tokens.
/v1/auth/sessionCreate a session for the given role.
{ "role": "student" }{ "token": "lx_eyJh…", "user": { "id": "u-stu-001", "role": "student" } }/v1/auth/sessionRevoke the current session.
{ "ok": true }/v1/auth/meReturn the authenticated user.
{ "id": "u-stu-001", "name": "Aarav Mehta", "role": "student" }Send your token in the Authorization header on every request.
curl https://api.lernix.app/v1/courses \
-H "Authorization: Bearer lx_eyJhbGciOiJI…" \
-H "Content-Type: application/json"