{"success":true,"message":"OK","data":{"name":"MathiPen REST API","version":"v1","supported_versions":["v1"],"documentation":"https://mathipen.com/docs/api-reference.md","authentication":{"bearer":"Authorization: Bearer <access token from POST /api/v1/auth/login>","api_key":"X-API-Key: esk_… — for server-to-server integrations, scoped by permission"},"rate_limits":{"api_key":"600 per minute","authenticated":"120 per minute","anonymous":"30 per minute"},"envelope":{"success":{"success":true,"message":"string","data":"object"},"failure":{"success":false,"message":"string","errors":"object"},"note":"Every response under /api/ is JSON, including its errors."},"endpoint_count":155,"groups":[{"name":"account","endpoints":[{"method":"GET","path":"/api/v1/account/profile","auth":"bearer","scopes":[],"role":[]},{"method":"PUT","path":"/api/v1/account/profile","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/account/password","auth":"bearer","scopes":[],"role":[]},{"method":"PUT","path":"/api/v1/account/two-factor","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/account/devices","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/account/devices/sign-out-others","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/account/notifications","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/account/notifications/unread-count","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/account/notifications/read-all","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/account/notifications/{id}/read","auth":"bearer","scopes":[],"role":[]},{"method":"DELETE","path":"/api/v1/account/notifications/{id}","auth":"bearer","scopes":[],"role":[]}]},{"name":"admin","endpoints":[{"method":"GET","path":"/api/v1/admin/dashboard","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/admin/users","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/admin/users","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/admin/users/{uuid}","auth":"bearer","scopes":[],"role":[]},{"method":"PUT","path":"/api/v1/admin/users/{uuid}","auth":"bearer","scopes":[],"role":[]},{"method":"DELETE","path":"/api/v1/admin/users/{uuid}","auth":"bearer","scopes":[],"role":[]},{"method":"PUT","path":"/api/v1/admin/users/{uuid}/status","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/admin/users/{uuid}/password-reset","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/admin/categories","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/admin/categories","auth":"bearer","scopes":[],"role":[]},{"method":"PUT","path":"/api/v1/admin/categories/{id}","auth":"bearer","scopes":[],"role":[]},{"method":"DELETE","path":"/api/v1/admin/categories/{id}","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/admin/subjects","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/admin/subjects","auth":"bearer","scopes":[],"role":[]},{"method":"PUT","path":"/api/v1/admin/subjects/{id}","auth":"bearer","scopes":[],"role":[]},{"method":"DELETE","path":"/api/v1/admin/subjects/{id}","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/admin/topics","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/admin/topics","auth":"bearer","scopes":[],"role":[]},{"method":"PUT","path":"/api/v1/admin/topics/{id}","auth":"bearer","scopes":[],"role":[]},{"method":"DELETE","path":"/api/v1/admin/topics/{id}","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/admin/settings","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/admin/settings/{group}","auth":"bearer","scopes":[],"role":[]},{"method":"PUT","path":"/api/v1/admin/settings/{group}","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/admin/logs/activity","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/admin/logs/audit","auth":"bearer","scopes":[],"role":[]}]},{"name":"attempts","endpoints":[{"method":"GET","path":"/api/v1/attempts","auth":"bearer","scopes":["attempts.start"],"role":[]},{"method":"GET","path":"/api/v1/attempts/{uuid}","auth":"bearer","scopes":["attempts.start"],"role":[]},{"method":"GET","path":"/api/v1/attempts/{uuid}/heartbeat","auth":"bearer","scopes":["attempts.start"],"role":[]},{"method":"POST","path":"/api/v1/attempts/{uuid}/answers","auth":"bearer","scopes":["attempts.start"],"role":[]},{"method":"POST","path":"/api/v1/attempts/{uuid}/mark","auth":"bearer","scopes":["attempts.start"],"role":[]},{"method":"POST","path":"/api/v1/attempts/{uuid}/events","auth":"bearer","scopes":["attempts.start"],"role":[]},{"method":"POST","path":"/api/v1/attempts/{uuid}/submit","auth":"bearer","scopes":["attempts.start","attempts.submit"],"role":[]}]},{"name":"auth","endpoints":[{"method":"POST","path":"/api/v1/auth/register","auth":"public","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/auth/login","auth":"public","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/auth/two-factor","auth":"public","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/auth/two-factor/resend","auth":"public","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/auth/refresh","auth":"public","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/auth/forgot-password","auth":"public","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/auth/reset-password","auth":"public","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/auth/verify-email","auth":"public","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/auth/verify-email/{token}","auth":"public","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/auth/resend-verification","auth":"public","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/auth/me","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/auth/devices","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/auth/change-password","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/auth/logout","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/auth/logout-all","auth":"bearer","scopes":[],"role":[]}]},{"name":"bootstrap","endpoints":[{"method":"GET","path":"/api/v1/bootstrap","auth":"public","scopes":[],"role":[]}]},{"name":"catalogue","endpoints":[{"method":"GET","path":"/api/v1/catalogue","auth":"public","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/catalogue/categories/{slug}","auth":"public","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/catalogue/subjects/{slug}","auth":"public","scopes":[],"role":[]}]},{"name":"certificates","endpoints":[{"method":"GET","path":"/api/v1/certificates/verify/{code}","auth":"public","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/certificates","auth":"bearer","scopes":["certificates.view_own","certificates.view"],"role":[]},{"method":"GET","path":"/api/v1/certificates/{uuid}","auth":"bearer","scopes":["certificates.view_own","certificates.view"],"role":[]},{"method":"GET","path":"/api/v1/certificates/{uuid}/download","auth":"bearer","scopes":["certificates.view_own","certificates.view","certificates.download"],"role":[]}]},{"name":"checkout","endpoints":[{"method":"GET","path":"/api/v1/checkout/{slug}/quote","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/checkout/{slug}/order","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/checkout/{slug}/enrol","auth":"bearer","scopes":[],"role":[]}]},{"name":"devices","endpoints":[{"method":"GET","path":"/api/v1/devices","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/devices","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/devices/{uuid}/forget","auth":"bearer","scopes":[],"role":[]}]},{"name":"exams","endpoints":[{"method":"GET","path":"/api/v1/exams","auth":"public","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/exams/{slug}","auth":"public","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/exams/{slug}/preflight","auth":"bearer","scopes":["attempts.start"],"role":[]},{"method":"POST","path":"/api/v1/exams/{slug}/attempts","auth":"bearer","scopes":["attempts.start"],"role":[]}]},{"name":"integrations","endpoints":[{"method":"GET","path":"/api/v1/integrations/exams","auth":"api_key","scopes":["exams.view"],"role":[]},{"method":"POST","path":"/api/v1/integrations/candidates","auth":"api_key","scopes":["students.create"],"role":[]},{"method":"POST","path":"/api/v1/integrations/enrolments","auth":"api_key","scopes":["students.update","exams.view"],"role":[]},{"method":"POST","path":"/api/v1/integrations/enrolments/revoke","auth":"api_key","scopes":["students.update","exams.view"],"role":[]},{"method":"GET","path":"/api/v1/integrations/results","auth":"api_key","scopes":["results.view"],"role":[]},{"method":"GET","path":"/api/v1/integrations/certificates","auth":"api_key","scopes":["certificates.view"],"role":[]},{"method":"GET","path":"/api/v1/integrations/certificates/{code}","auth":"api_key","scopes":["certificates.view"],"role":[]}]},{"name":"leaderboard","endpoints":[{"method":"GET","path":"/api/v1/leaderboard/{slug}","auth":"bearer","scopes":["leaderboard.view"],"role":[]}]},{"name":"lecturer","endpoints":[{"method":"GET","path":"/api/v1/lecturer/dashboard","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"GET","path":"/api/v1/lecturer/profile","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"PUT","path":"/api/v1/lecturer/profile","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"POST","path":"/api/v1/lecturer/profile/submit","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"GET","path":"/api/v1/lecturer/subjects","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"GET","path":"/api/v1/lecturer/subjects/{slug}","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"GET","path":"/api/v1/lecturer/exams","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"POST","path":"/api/v1/lecturer/exams","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"GET","path":"/api/v1/lecturer/exams/{id}","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"PUT","path":"/api/v1/lecturer/exams/{id}","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"DELETE","path":"/api/v1/lecturer/exams/{id}","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"POST","path":"/api/v1/lecturer/exams/{id}/duplicate","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"POST","path":"/api/v1/lecturer/exams/{id}/submit","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"POST","path":"/api/v1/lecturer/exams/{id}/publish","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"POST","path":"/api/v1/lecturer/exams/{id}/withdraw","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"GET","path":"/api/v1/lecturer/questions","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"POST","path":"/api/v1/lecturer/questions","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"GET","path":"/api/v1/lecturer/questions/{id}","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"PUT","path":"/api/v1/lecturer/questions/{id}","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"DELETE","path":"/api/v1/lecturer/questions/{id}","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"POST","path":"/api/v1/lecturer/questions/{id}/duplicate","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"POST","path":"/api/v1/lecturer/questions/{id}/submit","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"GET","path":"/api/v1/lecturer/exams/{id}/questions","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"POST","path":"/api/v1/lecturer/exams/{id}/questions","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"POST","path":"/api/v1/lecturer/exams/{id}/questions/reorder","auth":"bearer","scopes":[],"role":["lecturer"]},{"method":"DELETE","path":"/api/v1/lecturer/exams/{id}/questions/{question}","auth":"bearer","scopes":[],"role":["lecturer"]}]},{"name":"meta","endpoints":[{"method":"GET","path":"/api/v1","auth":"public","scopes":[],"role":[]}]},{"name":"mobile","endpoints":[{"method":"POST","path":"/api/v1/mobile/device/register","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/mobile/device/fcm-token","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/mobile/device/revoke","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/mobile/device/revoke-others","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/mobile/sessions","auth":"bearer","scopes":[],"role":[]}]},{"name":"notification-preferences","endpoints":[{"method":"GET","path":"/api/v1/notification-preferences","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/notification-preferences","auth":"bearer","scopes":[],"role":[]}]},{"name":"orders","endpoints":[{"method":"GET","path":"/api/v1/orders","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/orders/{uuid}","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/orders/{uuid}/verify","auth":"bearer","scopes":[],"role":[]}]},{"name":"payouts","endpoints":[{"method":"GET","path":"/api/v1/payouts","auth":"bearer","scopes":["payouts.request"],"role":[]},{"method":"POST","path":"/api/v1/payouts","auth":"bearer","scopes":["payouts.request"],"role":[]},{"method":"POST","path":"/api/v1/payouts/{uuid}/cancel","auth":"bearer","scopes":["payouts.request"],"role":[]}]},{"name":"ping","endpoints":[{"method":"GET","path":"/api/v1/ping","auth":"public","scopes":[],"role":[]}]},{"name":"purchases","endpoints":[{"method":"GET","path":"/api/v1/purchases","auth":"bearer","scopes":[],"role":[]}]},{"name":"rbac","endpoints":[{"method":"GET","path":"/api/v1/rbac/me","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/rbac/roles","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/rbac/roles","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/rbac/roles/{id}","auth":"bearer","scopes":[],"role":[]},{"method":"PUT","path":"/api/v1/rbac/roles/{id}","auth":"bearer","scopes":[],"role":[]},{"method":"DELETE","path":"/api/v1/rbac/roles/{id}","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/rbac/roles/{id}/permissions","auth":"bearer","scopes":[],"role":[]},{"method":"PUT","path":"/api/v1/rbac/roles/{id}/permissions","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/rbac/roles/{id}/permissions/restore-defaults","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/rbac/permissions","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/rbac/permissions","auth":"bearer","scopes":[],"role":[]},{"method":"DELETE","path":"/api/v1/rbac/permissions/{id}","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/rbac/users/{uuid}/permissions","auth":"bearer","scopes":[],"role":[]},{"method":"POST","path":"/api/v1/rbac/users/{uuid}/permissions","auth":"bearer","scopes":[],"role":[]},{"method":"DELETE","path":"/api/v1/rbac/users/{uuid}/permissions/{slug}","auth":"bearer","scopes":[],"role":[]},{"method":"PUT","path":"/api/v1/rbac/users/{uuid}/role","auth":"bearer","scopes":[],"role":[]}]},{"name":"reports","endpoints":[{"method":"GET","path":"/api/v1/reports","auth":"bearer","scopes":["reports.view"],"role":[]},{"method":"GET","path":"/api/v1/reports/{report}","auth":"bearer","scopes":["reports.view"],"role":[]}]},{"name":"results","endpoints":[{"method":"GET","path":"/api/v1/results","auth":"bearer","scopes":["results.view_own","results.view"],"role":[]},{"method":"GET","path":"/api/v1/results/{uuid}","auth":"bearer","scopes":["results.view_own","results.view"],"role":[]},{"method":"GET","path":"/api/v1/results/{uuid}/review","auth":"bearer","scopes":["results.view_own","results.view"],"role":[]}]},{"name":"settings","endpoints":[{"method":"GET","path":"/api/v1/settings/public","auth":"public","scopes":[],"role":[]}]},{"name":"student","endpoints":[{"method":"GET","path":"/api/v1/student/dashboard","auth":"bearer","scopes":[],"role":[]},{"method":"GET","path":"/api/v1/student/referrals","auth":"bearer","scopes":[],"role":[]}]},{"name":"wallet","endpoints":[{"method":"GET","path":"/api/v1/wallet","auth":"bearer","scopes":["wallet.view_own"],"role":[]},{"method":"GET","path":"/api/v1/wallet/transactions","auth":"bearer","scopes":["wallet.view_own"],"role":[]},{"method":"GET","path":"/api/v1/wallet/earnings","auth":"bearer","scopes":["wallet.view_own"],"role":[]},{"method":"GET","path":"/api/v1/wallet/accounts","auth":"bearer","scopes":["wallet.view_own"],"role":[]},{"method":"POST","path":"/api/v1/wallet/accounts","auth":"bearer","scopes":["wallet.view_own"],"role":[]}]}]}}