Reconnect to a lesson plan
API version 2026-10-affable-towhee
Rejoins the progress stream of a plan that is still generating. A finished plan answers one result. A plan still generating with no live stream to join answers one pending; poll GET /v1/lesson-plans/{id} until it is complete.
Scopes lesson_plans:read
Parameters
Lingara-Versionheaderstringoptional- The API version to answer this request under. Without it, an access token gets the version its client is pinned to, and a request with no token gets the current version. The version still in development is reached only by naming it here. An unknown version answers
400with codeapi_version_unknown.GET /v1/versionslists the versions. idpathstringrequired
Responses
200 The plan's remaining progress, then the plan
Stream events text/event-stream
Sends a keepalive comment every 15 seconds.
-
startedPlanStarted -
plan_idstringrequired
-
phasePlanPhase -
phasestringrequiredattemptintegerrequired
-
resultPlanResult Ends the stream -
planLessonPlanrequiredidstringrequiredstatusPlanStatusrequiredtitlestring | nulloptionalsource_langstringrequiredtarget_langstringrequiredlevelintegerrequiredcreated_atstringrequiredcompleted_atstring | nulloptionalai_generatedbooleanrequiredcontentLessonPlanContent | nulloptionalintroductionstring | nulloptionallearning_objectivesarray of stringrequiredvocabularyarray of PlanWordrequiredwordstringrequiredpronunciationstring | nulloptionaltranslationstringrequired
setsarray of PlanSetrequirednumberintegerrequiredcontextstring | nulloptionalquestionsarray of PlanQuestionrequiredtypestringrequiredpromptstringrequiredoptionsarray of string | nulloptionalanswerstringrequiredexplanationstringrequiredhintstring | nulloptional
-
pendingPlanPending Ends the stream -
plan_idstringrequiredstatusPlanStatusrequired
-
errorStreamError Ends the stream -
Arrives inside the 200 response. The status line has already been sent, so a failure after the stream opens is reported as this event.
codestringrequiredmessagestringrequiredplan_idstring | nulloptional
Errors
410application/json- The API version this request is answered under has been discontinued. Send a supported version in
Lingara-Version, or re-pin the client. 4XXapplication/json- The request was refused.
codesays why, anderrorsays it in words. 503application/json · text/plain- The service is temporarily unavailable; retry after the number of seconds in
Retry-After. During maintenance the body is plain text rather than the error envelope. 5XXapplication/json- The request was refused.
codesays why, anderrorsays it in words.
codestringrequiredWhy the request was refused, as a stable code to branch on: for example
insufficient_scope(403),rate_limited(429) and, for a metered client,spend_cap_reached(402) andmetered_billing_inactive(402).errorstringrequired
Example
Prefer a library? See the Libraries section.
Example stream
event: pending
data: {"plan_id":"3f1c2a9e-5b7d-4e21-9a0c-6d8e4f2b1a37","status":"generating"}