API Reference

The partner API: pull session facts and learning state, push student context, and turn your own material into lessons. Every route is partner-scoped — you only ever see your own students and sessions.

Base URL

https://www.evelynlearning.com/api/portal/v1

iAuthentication

Every request is HMAC-signed with your partner secret (x-evelyn-partner, x-evelyn-timestamp, x-evelyn-signature). Send JSON bodies with content-type: application/json. See Authentication.

Session facts & learning state

GET
/sessions/summary?ids=a,b,c

Per-session facts for up to 50 sessions: status, startedAt/endedAt, durationSec (ACTIVE tutoring seconds — the billed number), studentTurns, tutorTurns, boardItems, coarse location.

GET
/usage

Your tutoring minute pool, when one applies: { partner_id, pooled, cap_minutes, used_minutes, remaining_minutes, session_max_minutes }. Minutes are wall clock per sitting (tutor start to end, pauses included). Hide your start button under 1 minute remaining; cache for 60 s.

GET
/session-progress?sessionId=

Lesson position for one session: { lessonProgress | null, resumable, updatedAt }. Resumable within 30 days.

GET
/gaps?studentId=

Learning gaps for a student: id, kind (lo | prerequisite), loId, conceptLabel, status, confidence, evidence (signals, observation, student quotes), first/last seen.

GET
/mastery?studentId=

Mastery per learning objective: { [loId]: { score, exposures, lastTouchedAt, confidence } }.

POST
/learner-state

{ studentId, loIds?, courseTopic? } → per-LO estimate (0–1), confidence, trend, reviewDueAt, gaps, optional score projection, reviewDueCount. GET with the same fields as query params also works.

POST
/assigned-practice

{ studentId, courseId?, includeAcknowledged? } → homework the tutor assigned at the end of a session, with items and answer keys so you can grade locally.

POST
/session-result

Push your own session record or per-item evidence into the learner model (SessionEmitRequest). Not needed for embed sessions — the engine records those itself.

Student context

POST
/context

Store per-student preferences the tutor applies to every later session: pacing, humour ceiling, tone, modality, interests. Body is a StudentContext.

POST
/student-erase

{ studentId } → deletes everything the engine holds for that student. Use for parent deletion requests and sandbox cleanup.

Your curriculum

POST
/plan-generate

Turn your lesson text, assignment, PDF or image into a lesson plan the tutor can teach. Returns planId (use as curriculum_module in the token), objectives, estimated minutes.

POST
/plan-expand

{ planId, pickedLoIds } → when plan-generate answered mode: "picker" (too many objectives for the session), expand the ones you chose.

POST
/review-plan

{ studentId, los: [{ loId, title }], sessionMinutes? } → a remediation plan built from a student's weak objectives.

POST
/taxonomy-generate

Turn a course outline into a draft learning-objective graph you can review and adopt.

Practice & assessment

POST
/practice

{ studentId, courseId, scope: { loId } | { topicId }, count, difficulty?, excludeIds? } → practice items with hints and answer keys.

POST
/grade

{ studentId, itemId, response: { text } | { imageRef } } → rubric-based score with per-criterion feedback and a model response.

POST
/assessment

Build a short assessment set for a student across chosen objectives.

POST
/assessment/submit

Submit assessment responses → per-objective scores and review items.

Notes

GET
/notes

Rendered study notes for a topic, including tips the tutor added during sessions.

GET
/notes/unit

Rendered revision notes for a whole unit.

Mock exams (test prep)

GET
/mock/forms?studentId=&topicId=

Mock exam forms available to a student.

POST
/mock/attempts

Start an attempt. Companion routes: /mock/attempts/responses (save), /advance, /report, /review (tutor-led review of missed items).

Typical flow after a session

  1. Your page receives evelyn:session_ended and tells your backend.
  2. Backend calls GET /sessions/summary?ids=… for active minutes, turns and board items.
  3. Backend calls GET /gaps and GET /mastery (or /learner-state) for the student and stores the result for parent and teacher dashboards.
  4. Optionally POST /assigned-practice to show the homework the tutor set.

Billing figure

durationSec in /sessions/summary is active tutoring time: the gaps between consecutive turns, each capped at ten minutes. Idle time in an open tab is not counted. This is the number your invoice is based on.

Error format

{ "error": "unauthorized", "reason": "bad_signature" }
{ "error": "bad_request",  "reason": "studentId required" }
{ "error": "bad_request",  "issues": [ { "path": ["text"], "message": "…" } ] }

Status codes and reasons are listed under Authentication.